Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,9 @@ def run(prompt, plugin_json, openai_api_key):
|
|
| 10 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 11 |
tool = AIPluginTool.from_plugin_url(plugin_json)
|
| 12 |
llm = ChatOpenAI(temperature=0)
|
| 13 |
-
tools = load_tools(["requests_all"]
|
| 14 |
tools += [tool]
|
| 15 |
-
agent_chain = initialize_agent(
|
| 16 |
return agent_chain.run(prompt)
|
| 17 |
|
| 18 |
title="""
|
|
|
|
| 10 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 11 |
tool = AIPluginTool.from_plugin_url(plugin_json)
|
| 12 |
llm = ChatOpenAI(temperature=0)
|
| 13 |
+
tools = load_tools(["requests_all"])
|
| 14 |
tools += [tool]
|
| 15 |
+
agent_chain = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
|
| 16 |
return agent_chain.run(prompt)
|
| 17 |
|
| 18 |
title="""
|