Spaces:
Sleeping
Sleeping
Gaurav vashistha commited on
Commit ·
d4bb951
1
Parent(s): 3f2e31a
Bugfix: Increase Vision timeout and migrate to gemini-embedding-001
Browse files- agents/memory_agent.py +1 -1
- agents/visual_analyst.py +1 -1
agents/memory_agent.py
CHANGED
|
@@ -45,7 +45,7 @@ class MemoryAgent:
|
|
| 45 |
def _get_embedding(self, text):
|
| 46 |
# Using models/text-embedding-004
|
| 47 |
result = self.client.models.embed_content(
|
| 48 |
-
model="
|
| 49 |
contents=text,
|
| 50 |
config={"task_type": "retrieval_document"}
|
| 51 |
)
|
|
|
|
| 45 |
def _get_embedding(self, text):
|
| 46 |
# Using models/text-embedding-004
|
| 47 |
result = self.client.models.embed_content(
|
| 48 |
+
model="gemini-embedding-001",
|
| 49 |
contents=text,
|
| 50 |
config={"task_type": "retrieval_document"}
|
| 51 |
)
|
agents/visual_analyst.py
CHANGED
|
@@ -12,7 +12,7 @@ class VisualAnalyst:
|
|
| 12 |
if not self.api_key:
|
| 13 |
raise ValueError("GEMINI_API_KEY not found")
|
| 14 |
|
| 15 |
-
self.client = genai.Client(api_key=self.api_key, http_options={'timeout':
|
| 16 |
self.model_name = "gemini-1.5-flash"
|
| 17 |
print(f"✅ VisualAnalyst stored Gemini model: {self.model_name}")
|
| 18 |
|
|
|
|
| 12 |
if not self.api_key:
|
| 13 |
raise ValueError("GEMINI_API_KEY not found")
|
| 14 |
|
| 15 |
+
self.client = genai.Client(api_key=self.api_key, http_options={'timeout': 60.0})
|
| 16 |
self.model_name = "gemini-1.5-flash"
|
| 17 |
print(f"✅ VisualAnalyst stored Gemini model: {self.model_name}")
|
| 18 |
|