Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|