fix: default emb model (#702)

* fix: Remove incorrect prefix from default embedding model name

* refactor: Consolidate model settings in LLMSettings class
This commit is contained in:
you-n-g
2025-03-19 12:27:45 +08:00
committed by GitHub
parent fd747fe741
commit 8ea8817e7d
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class LiteLLMAPIBackend(APIBackend):
"""
response_list = []
for input_content_iter in input_content_list:
model_name = LITELLM_SETTINGS.embedding_model or "azure/text-embedding-3-small"
model_name = LITELLM_SETTINGS.embedding_model
logger.info(f"{LogColors.GREEN}Using emb model{LogColors.END} {model_name}", tag="debug_litellm_emb")
logger.info(f"Creating embedding for: {input_content_iter}", tag="debug_litellm_emb")
if not isinstance(input_content_iter, str):
+3 -2
View File
@@ -11,6 +11,9 @@ class LLMSettings(ExtendedBaseSettings):
# backend
backend: str = "rdagent.oai.backend.DeprecBackend"
chat_model: str = "gpt-4-turbo"
embedding_model: str = "text-embedding-3-small"
# TODO: most of the settings are only used on deprec.DeprecBackend.
# So they should move the settings to that folder.
@@ -48,7 +51,6 @@ class LLMSettings(ExtendedBaseSettings):
chat_openai_base_url: str | None = None #
chat_azure_api_base: str = ""
chat_azure_api_version: str = ""
chat_model: str = "gpt-4-turbo"
chat_max_tokens: int = 3000
chat_temperature: float = 0.5
chat_stream: bool = True
@@ -68,7 +70,6 @@ class LLMSettings(ExtendedBaseSettings):
embedding_openai_base_url: str = ""
embedding_azure_api_base: str = ""
embedding_azure_api_version: str = ""
embedding_model: str = ""
embedding_max_str_num: int = 50
# offline llama2 related config