APRG commited on
Commit
1afd64c
·
verified ·
1 Parent(s): 3450c27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,9 +42,9 @@ llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash-latest")
42
 
43
  @tool
44
  def wikipedia_search(title: str) -> str:
45
- """Provides a short snippet from a Wikipedia article with the given itle"""
46
  page = wikipedia.page(title)
47
- return page.content[:100]
48
 
49
  def agent_node(state: OrderState) -> OrderState:
50
  """agent with tool handling."""
@@ -124,7 +124,7 @@ llm_with_tools = llm.bind_tools(auto_tools + interactive_tools)
124
  graph_builder = StateGraph(OrderState)
125
 
126
  # Add nodes
127
- graph_builder.add_node("chatbot", agent_node)
128
  graph_builder.add_node("human", human_node)
129
  graph_builder.add_node("tools", tool_node)
130
 
 
42
 
43
  @tool
44
  def wikipedia_search(title: str) -> str:
45
+ """Provides a short snippet from a Wikipedia article with the given title"""
46
  page = wikipedia.page(title)
47
+ return page.content[:300]
48
 
49
  def agent_node(state: OrderState) -> OrderState:
50
  """agent with tool handling."""
 
124
  graph_builder = StateGraph(OrderState)
125
 
126
  # Add nodes
127
+ graph_builder.add_node("agent", agent_node)
128
  graph_builder.add_node("human", human_node)
129
  graph_builder.add_node("tools", tool_node)
130