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

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +5 -5
agent.py CHANGED
@@ -12,15 +12,15 @@ tools = [add, substract, multiply, divide, web_search]
12
  class AgentState(TypedDict):
13
  question: str
14
 
15
- def assistant(state: AgentState):
16
- return {
17
- "answer": [chat_with_tools.invoke(state["question"])],
18
- }
19
-
20
  def build_agent():
21
  llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
22
  chat_with_tools = llm.bind_tools(tools)
23
 
 
 
 
 
 
24
  ## The graph
25
  builder = StateGraph(AgentState)
26
 
 
12
  class AgentState(TypedDict):
13
  question: str
14
 
 
 
 
 
 
15
  def build_agent():
16
  llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)
17
  chat_with_tools = llm.bind_tools(tools)
18
 
19
+ def assistant(state: AgentState):
20
+ return {
21
+ "answer": [chat_with_tools.invoke(state["question"])],
22
+ }
23
+
24
  ## The graph
25
  builder = StateGraph(AgentState)
26