Skip to content

Commit

Permalink
Merge pull request cheshire-cat-ai#660 from nicola-corbellini/feature…
Browse files Browse the repository at this point in the history
…/gemini_embedder

Fix Gemini embedder
  • Loading branch information
pieroit authored Jan 10, 2024
2 parents be3e22e + 6298144 commit 3695445
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 3695445

Please sign in to comment.