WeByT3 commited on
Commit
af04a70
·
verified ·
1 Parent(s): cdcbc72

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
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
- question: str
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
- "answer": [chat_with_tools.invoke(state["question"])],
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