Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -10,7 +10,7 @@ from typing import TypedDict
|
|
| 10 |
tools = [add, substract, multiply, divide, web_search]
|
| 11 |
|
| 12 |
class AgentState(TypedDict):
|
| 13 |
-
|
| 14 |
|
| 15 |
def build_agent():
|
| 16 |
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
|
@@ -18,7 +18,7 @@ def build_agent():
|
|
| 18 |
|
| 19 |
def assistant(state: AgentState):
|
| 20 |
return {
|
| 21 |
-
"
|
| 22 |
}
|
| 23 |
|
| 24 |
## The graph
|
|
|
|
| 10 |
tools = [add, substract, multiply, divide, web_search]
|
| 11 |
|
| 12 |
class AgentState(TypedDict):
|
| 13 |
+
messages: str
|
| 14 |
|
| 15 |
def build_agent():
|
| 16 |
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
|
|
|
|
| 18 |
|
| 19 |
def assistant(state: AgentState):
|
| 20 |
return {
|
| 21 |
+
"messages": [chat_with_tools.invoke(state["messages"])],
|
| 22 |
}
|
| 23 |
|
| 24 |
## The graph
|