Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -18,7 +18,7 @@ class ReActAgent:
|
|
| 18 |
self.prompt = hub.pull("hwchase17/react-chat")
|
| 19 |
self.llm = OpenAI()
|
| 20 |
agent = self.create_agent()
|
| 21 |
-
self.agent_executor = AgentExecutor(agent=agent, tools=self.tools, verbose=
|
| 22 |
|
| 23 |
def create_agent(self):
|
| 24 |
"""
|
|
@@ -27,7 +27,7 @@ class ReActAgent:
|
|
| 27 |
agent = create_react_agent(self.llm, self.tools, self.prompt)
|
| 28 |
return agent
|
| 29 |
|
| 30 |
-
def run(self, question,history=""
|
| 31 |
"""
|
| 32 |
Executes the agent with the provided question, verbosity option, and updates history.
|
| 33 |
"""
|
|
|
|
| 18 |
self.prompt = hub.pull("hwchase17/react-chat")
|
| 19 |
self.llm = OpenAI()
|
| 20 |
agent = self.create_agent()
|
| 21 |
+
self.agent_executor = AgentExecutor(agent=agent, tools=self.tools, verbose=True)
|
| 22 |
|
| 23 |
def create_agent(self):
|
| 24 |
"""
|
|
|
|
| 27 |
agent = create_react_agent(self.llm, self.tools, self.prompt)
|
| 28 |
return agent
|
| 29 |
|
| 30 |
+
def run(self, question,history=""):
|
| 31 |
"""
|
| 32 |
Executes the agent with the provided question, verbosity option, and updates history.
|
| 33 |
"""
|