Spaces:
Sleeping
Sleeping
Commit
·
51cc59e
1
Parent(s):
1600234
iterations to 15
Browse files
app.py
CHANGED
@@ -791,7 +791,7 @@ Final Answer: Python, JavaScript, Java
|
|
791 |
Q: What is the maximum number os birds in the video https://www.youtube.com/watch?v=example?
|
792 |
Final Answer: 12
|
793 |
|
794 |
-
If after
|
795 |
"""
|
796 |
# If your final answer is something like 'there were 5 studio albums published between 2000 and 2009' then modify YOUR FINAL ANSWER as: '5'
|
797 |
# If your final answer is something like 'b, e' then YOUR FINAL ANSWER be: 'b, e'
|
@@ -871,7 +871,7 @@ agent = initialize_agent(
|
|
871 |
agent=AgentType.OPENAI_FUNCTIONS,#AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
872 |
agent_kwargs={"system_message": system_prompt},
|
873 |
verbose=True,
|
874 |
-
max_iterations=
|
875 |
max_execution_time=4000, # Increase as needed
|
876 |
early_stopping_method="generate",
|
877 |
handle_parsing_errors=True
|
|
|
791 |
Q: What is the maximum number os birds in the video https://www.youtube.com/watch?v=example?
|
792 |
Final Answer: 12
|
793 |
|
794 |
+
If after 12 iterations also a tool usage is not useful then try to answer directly based on your knowledge. If you cannot answer then just say "no_answer" as YOUR FINAL ANSWER.
|
795 |
"""
|
796 |
# If your final answer is something like 'there were 5 studio albums published between 2000 and 2009' then modify YOUR FINAL ANSWER as: '5'
|
797 |
# If your final answer is something like 'b, e' then YOUR FINAL ANSWER be: 'b, e'
|
|
|
871 |
agent=AgentType.OPENAI_FUNCTIONS,#AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
872 |
agent_kwargs={"system_message": system_prompt},
|
873 |
verbose=True,
|
874 |
+
max_iterations=15, # Increase as needed
|
875 |
max_execution_time=4000, # Increase as needed
|
876 |
early_stopping_method="generate",
|
877 |
handle_parsing_errors=True
|