File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,19 +35,22 @@ def _parse_config(self) -> dict:
3535 raise Exception (f"{ agent } _API_KEY not found" )
3636
3737 # load llm
38- if os .environ ["LLM_PROVIDER" ] or os .environ ["LLM_MODEL" ]:
38+ if os .environ ["LLM_PROVIDER" ] and os .environ ["LLM_MODEL" ]:
39+
3940 config ["llm" ] = {
4041 "provider" : os .environ ["LLM_PROVIDER" ],
4142 "model" : os .environ ["LLM_MODEL" ],
42- "api_key" : os .environ ["LLM_API_KEY" ],
43- "extra_params" : {
43+ "api_key" : os .environ ["LLM_API_KEY" ]
44+ }
45+
46+ if os .environ ["LLM_PROVIDER" ] == "ollama" :
47+ config ['llm' ]["extra_params" ] = {
4448 "host" : os .environ ["LLM_HOST" ],
4549 "models_path" : os .environ ["LLM_MODELS_PATH" ]
4650 }
47- }
4851 else :
4952 raise Exception (
50- "LLM_PROVIDER or LLM_MODEL not set in .env" )
53+ "LLM_PROVIDER and LLM_MODEL not set in .env" )
5154
5255 # load services
5356 config ["services" ] = []
You can’t perform that action at this time.
0 commit comments