Update app.py
Browse files
app.py
CHANGED
|
@@ -54,31 +54,31 @@ tools = [web_search]
|
|
| 54 |
|
| 55 |
#LLMS
|
| 56 |
# Create LLM class
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 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=
|
| 71 |
tools=[web_search],
|
| 72 |
prompt=prompt_search,
|
| 73 |
-
name="web_research_agent"
|
| 74 |
)
|
| 75 |
|
| 76 |
supervisor = create_supervisor(
|
| 77 |
-
model=
|
| 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 |
|