skkjodhpur commited on
Commit
7a7686b
·
verified ·
1 Parent(s): 712003a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -44,7 +44,14 @@ agent = create_react_agent(tools=tools, llm=llm, prompt=prompt)
44
 
45
  # Function to run the agent
46
  def search(query):
47
- output = agent.invoke({"query": query})
 
 
 
 
 
 
 
48
  return output
49
 
50
  # Create the Gradio interface
 
44
 
45
  # Function to run the agent
46
  def search(query):
47
+ inputs = {
48
+ "query": query,
49
+ "agent_scratchpad": "", # Initial empty scratchpad
50
+ "tools": tools,
51
+ "tool_names": ", ".join([tool.name for tool in tools]),
52
+ "intermediate_steps": [] # Initial empty intermediate steps
53
+ }
54
+ output = agent.invoke(inputs)
55
  return output
56
 
57
  # Create the Gradio interface