Skip to content

Commit

Permalink
fix gemini embedder
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-corbellini committed Jan 10, 2024
1 parent be3e22e commit 6298144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/cat/factory/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class EmbedderGeminiChatConfig(EmbedderSettings):
This class contains the configuration for the Gemini Embedder.
"""
google_api_key: str
model_name: str = "models/embedding-001" # Default model https://python.langchain.com/docs/integrations/text_embedding/google_generative_ai
model: str = "models/embedding-001" # Default model https://python.langchain.com/docs/integrations/text_embedding/google_generative_ai

_pyclass: Type = GoogleGenerativeAIEmbeddings

Expand Down
2 changes: 1 addition & 1 deletion core/cat/looking_glass/cheshire_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def load_language_embedder(self) -> embedders.EmbedderSettings:
elif type(self._llm) in [ChatGoogleGenerativeAI]:
embedder = embedders.EmbedderGeminiChatConfig.get_embedder_from_config(
{
"model": self.embedder.model_name,
"model": "models/embedding-001",
"google_api_key": self._llm.google_api_key,
}
)
Expand Down

0 comments on commit 6298144

Please sign in to comment.