Skip to content

Commit

Permalink
chore(backend): update admin_llm_options
Browse files Browse the repository at this point in the history
  • Loading branch information
wd0517 committed Jul 24, 2024
1 parent fe52ad1 commit 2a5fd34
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/app/rag/llm_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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": "****",
},
),
]

0 comments on commit 2a5fd34

Please sign in to comment.