From cecec30ca8770bc783d1c3ca374a6223af5e0bbf Mon Sep 17 00:00:00 2001 From: Somashekar B R Date: Tue, 24 Sep 2024 23:37:03 +0530 Subject: [PATCH] fixed test black error --- private_gpt/components/embedding/embedding_component.py | 4 +++- private_gpt/settings/settings.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/private_gpt/components/embedding/embedding_component.py b/private_gpt/components/embedding/embedding_component.py index 173501c31..4f0ae93b2 100644 --- a/private_gpt/components/embedding/embedding_component.py +++ b/private_gpt/components/embedding/embedding_component.py @@ -75,7 +75,9 @@ def __init__(self, settings: Settings) -> None: "FireworksEmbedding dependencies not found, install with `poetry install --extras embeddings-fireworks`" ) from e - api_key = settings.fireworks.embedding_api_key or settings.fireworks.api_key + api_key = ( + settings.fireworks.embedding_api_key or settings.fireworks.api_key + ) model = settings.openai.embedding_model self.embedding_model = FireworksEmbedding( api_key=api_key, diff --git a/private_gpt/settings/settings.py b/private_gpt/settings/settings.py index f94162f4f..dbb0d2ad5 100644 --- a/private_gpt/settings/settings.py +++ b/private_gpt/settings/settings.py @@ -269,6 +269,7 @@ class OpenAISettings(BaseModel): description="OpenAI embedding Model to use. Example: 'text-embedding-3-large'.", ) + class FireWorksSettings(BaseModel): api_key: str model: str = Field( @@ -285,6 +286,7 @@ class FireWorksSettings(BaseModel): description="FIREWORKS embedding Model to use. Example: 'nomic-ai/nomic-embed-text-v1.5'.", ) + class GeminiSettings(BaseModel): api_key: str model: str = Field(