Spaces:
Runtime error
Runtime error
Commit
·
e90de0c
1
Parent(s):
860b20f
ADD initial agent param
Browse files
app.py
CHANGED
|
@@ -537,9 +537,22 @@ agent_OPENAI_MULTI = AgentExecutor.from_agent_and_tools(
|
|
| 537 |
# agent.max_execution_time = int(os.getenv("max_iterations"))
|
| 538 |
# agent.handle_parsing_errors = True
|
| 539 |
# agent.early_stopping_method = "generate"
|
|
|
|
| 540 |
global agent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
agent = agent_ZEROSHOT_AGENT
|
| 542 |
|
|
|
|
| 543 |
print(agent.agent.llm_chain.prompt.template)
|
| 544 |
# print(agent.agent.llm_chain.prompt)
|
| 545 |
|
|
|
|
| 537 |
# agent.max_execution_time = int(os.getenv("max_iterations"))
|
| 538 |
# agent.handle_parsing_errors = True
|
| 539 |
# agent.early_stopping_method = "generate"
|
| 540 |
+
|
| 541 |
global agent
|
| 542 |
+
Choice = os.getenv("agent_type")
|
| 543 |
+
|
| 544 |
+
if Choice =='Zero Short Agent':
|
| 545 |
+
agent = agent_ZEROSHOT_AGENT
|
| 546 |
+
print("Set to:", Choice)
|
| 547 |
+
elif Choice =='Zero Short React':
|
| 548 |
+
agent = agent_ZEROSHOT_REACT
|
| 549 |
+
print("Set to:", Choice)
|
| 550 |
+
elif Choice =='OpenAI Multi':
|
| 551 |
+
agent = agent_OPENAI_MULTI
|
| 552 |
+
print("Set to:", Choice)
|
| 553 |
agent = agent_ZEROSHOT_AGENT
|
| 554 |
|
| 555 |
+
|
| 556 |
print(agent.agent.llm_chain.prompt.template)
|
| 557 |
# print(agent.agent.llm_chain.prompt)
|
| 558 |
|