Scott Cogan commited on
Commit
d63af7e
·
1 Parent(s): 348f005

requirements update for llm compat

Browse files
Files changed (1) hide show
  1. app.py +15 -17
app.py CHANGED
@@ -310,23 +310,21 @@ class BasicAgent:
310
  else:
311
  messages_with_system = [self.sys_msg] + messages
312
 
313
- # Create a GenAI tool object with the correct parameter format
314
- genai_tool = GenAITool(
315
- function_declarations=[{
316
- "name": "google_search",
317
- "description": "Search for information on the web",
318
- "parameters": {
319
- "type": "object",
320
- "properties": {
321
- "query": {
322
- "type": "string",
323
- "description": "The search query"
324
- }
325
- },
326
- "required": ["query"]
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(