You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output format seems to vary. These are examples from the constant TOOL_CALLING_SYSTEM_PROMPT :
To provide the final answer to the task, use an action blob with "tool_name": "final_answer" tool. It is the only way to complete the task, else you will be stuck on a loop. So your final output should look like this:
Action:
{
"tool_name": "final_answer",
"tool_arguments": {"answer": "insert your final answer here"}
}
...
Task: "What is the result of the following operation: 5 + 3 + 1294.678?"
Action:
{
"tool_name": "python_interpreter",
"tool_arguments": {"code": "5 + 3 + 1294.678"}
}
Observation: 1302.678
Action:
{
"tool_name": "final_answer",
"tool_arguments": "1302.678"
}
In the first example, the result is {"answer": "insert your final answer here"}. In the last, it is "1302.678". Just to share food for thought, I escaped the problem with:
def get_result_str(result_str):
try:
result_obj = json.loads(result_str)
result = result_obj['answer']
except ValueError as e:
result = result_str
return result
In the case that you would like me to to try to code something, let me know.
Live long and prosper.
The text was updated successfully, but these errors were encountered:
joaopauloschuler
changed the title
Output format?
Output format? {"answer": "insert your final answer here"} or "insert your final answer here" ?
Jan 22, 2025
joaopauloschuler
changed the title
Output format? {"answer": "insert your final answer here"} or "insert your final answer here" ?
Output format? {"answer": "insert your final answer here"} or "insert your final answer here" ?
Jan 22, 2025
Hello and congrats for your job.
The output format seems to vary. These are examples from the constant
TOOL_CALLING_SYSTEM_PROMPT
:...
In the first example, the result is
{"answer": "insert your final answer here"}
. In the last, it is"1302.678"
. Just to share food for thought, I escaped the problem with:And then,
get_result_str
can be used with:In the case that you would like me to to try to code something, let me know.
Live long and prosper.
The text was updated successfully, but these errors were encountered: