apple muncy commited on
Commit
b6ac13f
·
1 Parent(s): f5a41c7

mess with tool_node

Browse files

Signed-off-by: apple muncy <[email protected]>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,7 +52,7 @@ tools = [
52
 
53
  # Bind tools to the chat model
54
  chat_with_tools = chat.bind_tools(tools)
55
-
56
  # Generate the AgentState and Agent graph
57
  class AgentState(TypedDict):
58
  messages: Annotated[list[AnyMessage], add_messages]
@@ -76,7 +76,7 @@ builder = StateGraph(AgentState)
76
 
77
  # Define nodes: these do the work
78
  builder.add_node("assistant", assistant)
79
- builder.add_node("tools", ToolNode(tools))
80
 
81
  # Define edges: these determine how the control flow moves
82
  builder.add_edge(START, "assistant")
 
52
 
53
  # Bind tools to the chat model
54
  chat_with_tools = chat.bind_tools(tools)
55
+ tool_node=ToolNode(tools)
56
  # Generate the AgentState and Agent graph
57
  class AgentState(TypedDict):
58
  messages: Annotated[list[AnyMessage], add_messages]
 
76
 
77
  # Define nodes: these do the work
78
  builder.add_node("assistant", assistant)
79
+ builder.add_node("tools", tool_node)
80
 
81
  # Define edges: these determine how the control flow moves
82
  builder.add_edge(START, "assistant")