From 7a22e145cf94f9beba048a65dd4792901e7750a6 Mon Sep 17 00:00:00 2001 From: David Oplatka Date: Mon, 21 Oct 2024 15:34:13 -0700 Subject: [PATCH] Fix Default LLMs (#23) * Fix Default LLMs * Code Cleanup --- vectara_agentic/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vectara_agentic/utils.py b/vectara_agentic/utils.py index 277eac2..15ba52f 100644 --- a/vectara_agentic/utils.py +++ b/vectara_agentic/utils.py @@ -31,7 +31,7 @@ def _get_llm_params_for_role(role: LLMRole) -> Tuple[ModelProvider, str]: """Get the model provider and model name for the specified role.""" if role == LLMRole.TOOL: model_provider = ModelProvider( - os.getenv("VECTARA_AGENTIC_TOOL_LLM_PROVIDER", str(DEFAULT_MODEL_PROVIDER)) + os.getenv("VECTARA_AGENTIC_TOOL_LLM_PROVIDER", DEFAULT_MODEL_PROVIDER.value) ) model_name = os.getenv( "VECTARA_AGENTIC_TOOL_MODEL_NAME", @@ -39,7 +39,7 @@ def _get_llm_params_for_role(role: LLMRole) -> Tuple[ModelProvider, str]: ) else: model_provider = ModelProvider( - os.getenv("VECTARA_AGENTIC_MAIN_LLM_PROVIDER", str(DEFAULT_MODEL_PROVIDER)) + os.getenv("VECTARA_AGENTIC_MAIN_LLM_PROVIDER", DEFAULT_MODEL_PROVIDER.value) ) model_name = os.getenv( "VECTARA_AGENTIC_MAIN_MODEL_NAME", @@ -47,7 +47,7 @@ def _get_llm_params_for_role(role: LLMRole) -> Tuple[ModelProvider, str]: ) agent_type = AgentType( - os.getenv("VECTARA_AGENTIC_AGENT_TYPE", str(AgentType.OPENAI)) + os.getenv("VECTARA_AGENTIC_AGENT_TYPE", AgentType.OPENAI.value) ) if ( role == LLMRole.MAIN