Scott Cogan
commited on
Commit
·
d63af7e
1
Parent(s):
348f005
requirements update for llm compat
Browse files
app.py
CHANGED
|
@@ -310,23 +310,21 @@ class BasicAgent:
|
|
| 310 |
else:
|
| 311 |
messages_with_system = [self.sys_msg] + messages
|
| 312 |
|
| 313 |
-
# Create
|
| 314 |
-
genai_tool =
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
"
|
| 319 |
-
|
| 320 |
-
"
|
| 321 |
-
"
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
}]
|
| 329 |
-
)
|
| 330 |
|
| 331 |
logger.info("Attempting to use primary LLM (Gemini)")
|
| 332 |
response = self.primary_llm.invoke(
|
|
|
|
| 310 |
else:
|
| 311 |
messages_with_system = [self.sys_msg] + messages
|
| 312 |
|
| 313 |
+
# Create tool configuration for Gemini
|
| 314 |
+
genai_tool = {
|
| 315 |
+
"name": "google_search",
|
| 316 |
+
"description": "Search for information on the web",
|
| 317 |
+
"parameters": {
|
| 318 |
+
"type": "object",
|
| 319 |
+
"properties": {
|
| 320 |
+
"query": {
|
| 321 |
+
"type": "string",
|
| 322 |
+
"description": "The search query"
|
| 323 |
+
}
|
| 324 |
+
},
|
| 325 |
+
"required": ["query"]
|
| 326 |
+
}
|
| 327 |
+
}
|
|
|
|
|
|
|
| 328 |
|
| 329 |
logger.info("Attempting to use primary LLM (Gemini)")
|
| 330 |
response = self.primary_llm.invoke(
|