Allow parameterizing OpenAI embeddings component (api_base, key, model)

This commit is contained in:
Yevhenii Semendiak 2024-05-09 00:42:55 +03:00
parent 659e0f1a9d
commit 90dadda249
2 changed files with 20 additions and 2 deletions

View file

@ -206,6 +206,15 @@ class OpenAISettings(BaseModel):
"gpt-3.5-turbo",
description="OpenAI Model to use. Example: 'gpt-4'.",
)
embedding_api_base: str = Field(
None,
description="Base URL of OpenAI API. Example: 'https://api.openai.com/v1'.",
)
embedding_api_key: str
embedding_model: str = Field(
"text-embedding-ada-002",
description="OpenAI Model to use. Example: 'gpt-4'.",
)
class OllamaSettings(BaseModel):