Spaces:
Runtime error
Runtime error
Commit
·
45db887
1
Parent(s):
0e213a6
update prompt
Browse files
app.py
CHANGED
@@ -806,6 +806,23 @@ Observation: the result of the action
|
|
806 |
Thought: I now know the final answer
|
807 |
Final Answer: the final answer to the original input question"""
|
808 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
SUFFIX = """
|
810 |
When it is necessary to use tools, you must define 'Action', 'Action Input'.
|
811 |
Begin!
|
@@ -886,7 +903,7 @@ agent_ZEROSHOT_REACT_2 = initialize_agent(tools_remote, GPTfake,
|
|
886 |
early_stopping_method="generate",
|
887 |
agent_kwargs={
|
888 |
'prefix': PREFIX_2,
|
889 |
-
|
890 |
'suffix': SUFFIX,
|
891 |
# 'input_variables': input_variables,
|
892 |
},
|
|
|
806 |
Thought: I now know the final answer
|
807 |
Final Answer: the final answer to the original input question"""
|
808 |
|
809 |
+
FORMAT_INSTRUCTIONS_3 = """To use a tool, please use the following format:
|
810 |
+
'''
|
811 |
+
Thought: you should always think about what to do
|
812 |
+
Action: the action to take, should be one of [{tool_names}]
|
813 |
+
Action Input: the input to the action
|
814 |
+
Observation: the result of the action
|
815 |
+
'''
|
816 |
+
|
817 |
+
When you have gathered all the information:
|
818 |
+
'''
|
819 |
+
Thought: I now know the final answer
|
820 |
+
Final Answer: the final answer to the original input question
|
821 |
+
'''
|
822 |
+
"""
|
823 |
+
|
824 |
+
|
825 |
+
|
826 |
SUFFIX = """
|
827 |
When it is necessary to use tools, you must define 'Action', 'Action Input'.
|
828 |
Begin!
|
|
|
903 |
early_stopping_method="generate",
|
904 |
agent_kwargs={
|
905 |
'prefix': PREFIX_2,
|
906 |
+
'format_instructions': FORMAT_INSTRUCTIONS_3,
|
907 |
'suffix': SUFFIX,
|
908 |
# 'input_variables': input_variables,
|
909 |
},
|