Spaces:
Sleeping
Sleeping
Commit
·
1600234
1
Parent(s):
44e8e4f
agenttype + iterations
Browse files
app.py
CHANGED
@@ -791,8 +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 |
-
|
795 |
-
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.
|
796 |
"""
|
797 |
# If your final answer is something like 'there were 5 studio albums published between 2000 and 2009' then modify YOUR FINAL ANSWER as: '5'
|
798 |
# If your final answer is something like 'b, e' then YOUR FINAL ANSWER be: 'b, e'
|
@@ -872,7 +871,7 @@ agent = initialize_agent(
|
|
872 |
agent=AgentType.OPENAI_FUNCTIONS,#AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
873 |
agent_kwargs={"system_message": system_prompt},
|
874 |
verbose=True,
|
875 |
-
max_iterations=
|
876 |
max_execution_time=4000, # Increase as needed
|
877 |
early_stopping_method="generate",
|
878 |
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 10 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=12, # Increase as needed
|
875 |
max_execution_time=4000, # Increase as needed
|
876 |
early_stopping_method="generate",
|
877 |
handle_parsing_errors=True
|