Spaces:
Sleeping
Sleeping
Gaurav vashistha commited on
Commit ·
016d4bc
1
Parent(s): d4bb951
Bugfix: Force embedding dimension to 768 and increase Vision timeout to 180s
Browse files- agents/memory_agent.py +1 -1
- agents/visual_analyst.py +1 -1
agents/memory_agent.py
CHANGED
|
@@ -47,7 +47,7 @@ class MemoryAgent:
|
|
| 47 |
result = self.client.models.embed_content(
|
| 48 |
model="gemini-embedding-001",
|
| 49 |
contents=text,
|
| 50 |
-
config=
|
| 51 |
)
|
| 52 |
return result.embeddings[0].values
|
| 53 |
|
|
|
|
| 47 |
result = self.client.models.embed_content(
|
| 48 |
model="gemini-embedding-001",
|
| 49 |
contents=text,
|
| 50 |
+
config=genai.types.EmbedContentConfig(output_dimensionality=768)
|
| 51 |
)
|
| 52 |
return result.embeddings[0].values
|
| 53 |
|
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': 180.0})
|
| 16 |
self.model_name = "gemini-1.5-flash"
|
| 17 |
print(f"✅ VisualAnalyst stored Gemini model: {self.model_name}")
|
| 18 |
|