100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
fix(gemini_rag): update embed_content signature to google-genai SDK standards
Morad Moqbel0629c5681976
diff --git a/rag_tutorials/gemini_agentic_rag/agentic_rag_gemini.py b/rag_tutorials/gemini_agentic_rag/agentic_rag_gemini.pyindex f906983d..34114791 100644--- a/rag_tutorials/gemini_agentic_rag/agentic_rag_gemini.py+++ b/rag_tutorials/gemini_agentic_rag/agentic_rag_gemini.py@@ -5,6 +5,7 @@ from typing import Listimport streamlit as stfrom google import genai+from google.genai import typesimport bs4from agno.agent import Agentfrom agno.models.google import Gemini@@ -31,10 +32,10 @@ class GeminiEmbedder(Embeddings):def embed_query(self, text: str) -> List[float]:response = self.client.models.embed_content(model=self.model,- content=text,- task_type="retrieval_document"+ contents=text,+ config=types.EmbedContentConfig(task_type="RETRIEVAL_DOCUMENT"))- return response['embedding']+ return response.embeddings[0].values# Constants