Allow parameterizing OpenAI embeddings component (api_base, key, model) (#1920)
Some checks failed
release-please / release-please (push) Has been cancelled
tests / setup (push) Has been cancelled
tests / ${{ matrix.quality-command }} (black) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (mypy) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (ruff) (push) Has been cancelled
tests / test (push) Has been cancelled
tests / all_checks_passed (push) Has been cancelled

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

* Update settings

* Update description
This commit is contained in:
Yevhenii Semendiak 2024-05-17 10:52:50 +03:00 committed by GitHub
parent 45df99feb7
commit 3b3e96ad6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 2 deletions

View file

@ -209,6 +209,15 @@ class OpenAISettings(BaseModel):
120.0,
description="Time elapsed until openailike server times out the request. Default is 120s. Format is float. ",
)
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 embedding Model to use. Example: 'text-embedding-3-large'.",
)
class OllamaSettings(BaseModel):