mikethor007 commited on
Commit
d241afa
·
verified ·
1 Parent(s): 54a9186

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -54,31 +54,31 @@ tools = [web_search]
54
 
55
  #LLMS
56
  # Create LLM class
57
- #gemini_llm = ChatGoogleGenerativeAI(
58
- # model= "gemini-2.0-flash", # replace with "gemini-2.0-flash"
59
- # temperature=1.0,
60
- # max_tokens=None,
61
- # timeout=None,
62
- # max_retries=2,
63
- # google_api_key=GEMINI_API_KEY,
64
- #)
65
  # Bind tools to the model
66
  #general_model = gemini_llm.bind_tools([get_weather_forecast])
67
 
68
  #AGENTS
69
  web_research_agent = create_react_agent(
70
- model="gemini-2.0-flash", # gpt-4o-mini-2024-07-18
71
  tools=[web_search],
72
  prompt=prompt_search,
73
- name="web_research_agent",
74
  )
75
 
76
  supervisor = create_supervisor(
77
- model=init_chat_model("gemini-2.0-flash"),
78
  agents=[web_research_agent],
79
  prompt=prompt_recomendado,
80
  add_handoff_back_messages=True,
81
- output_mode="full_history",
82
  ).compile()
83
 
84
 
 
54
 
55
  #LLMS
56
  # Create LLM class
57
+ gemini_llm = ChatGoogleGenerativeAI(
58
+ model= "gemini-2.0-flash-exp", # replace with "gemini-2.0-flash"
59
+ temperature=1.0,
60
+ max_tokens=None,
61
+ timeout=None,
62
+ max_retries=2,
63
+ google_api_key=GEMINI_API_KEY,
64
+ )
65
  # Bind tools to the model
66
  #general_model = gemini_llm.bind_tools([get_weather_forecast])
67
 
68
  #AGENTS
69
  web_research_agent = create_react_agent(
70
+ model=gemini_llm,
71
  tools=[web_search],
72
  prompt=prompt_search,
73
+ name="web_research_agent"
74
  )
75
 
76
  supervisor = create_supervisor(
77
+ model=gemini_llm,
78
  agents=[web_research_agent],
79
  prompt=prompt_recomendado,
80
  add_handoff_back_messages=True,
81
+ output_mode="full_history"
82
  ).compile()
83
 
84