diff --git a/backend/app/rag/llm_option.py b/backend/app/rag/llm_option.py index fa80fc23..c1564270 100644 --- a/backend/app/rag/llm_option.py +++ b/backend/app/rag/llm_option.py @@ -8,6 +8,7 @@ class LLMOption(BaseModel): provider: LLMProvider default_model: str model_description: str + default_credentials: str | dict = "" credentials_display_name: str credentials_description: str credentials_type: str = "str" @@ -21,6 +22,7 @@ class LLMOption(BaseModel): credentials_display_name="OpenAI API Key", credentials_description="The API key of OpenAI, you can find it in https://platform.openai.com/api-keys", credentials_type="str", + default_credentials="sk-****", ), LLMOption( provider=LLMProvider.GEMINI, @@ -29,6 +31,7 @@ class LLMOption(BaseModel): credentials_display_name="Google API Key", credentials_description="The API key of Google AI Studio, you can find it in https://aistudio.google.com/app/apikey", credentials_type="str", + default_credentials="AIza****", ), LLMOption( provider=LLMProvider.ANTHROPIC_VERTEX, @@ -37,5 +40,10 @@ class LLMOption(BaseModel): credentials_display_name="Google Credentials JSON", credentials_description="The JSON Object of Google Credentials, refer to https://cloud.google.com/docs/authentication/provide-credentials-adc#on-prem", credentials_type="dict", + default_credentials={ + "type": "service_account", + "project_id": "****", + "private_key_id": "****", + }, ), ]