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
Copy file name to clipboardExpand all lines: src/llama_stack_client/lib/agents/react/prompts.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
23
23
The `action` key should specify the $TOOL_NAME the name of the tool to use and the `tool_params` key should specify the parameters key as input to the tool.
24
24
25
-
Make sure to have the $TOOL_PARAMS as a dictionary in the right format for the tool you are using, and do not put variable names as input if you can find the right values.
25
+
Make sure to have the $TOOL_PARAMS as a list of dictionaries in the right format for the tool you are using, and do not put variable names as input if you can find the right values.
26
26
27
27
You should always think about one action to take, and have the `thought` key contain your thought process about this action.
28
28
If the tool responds, the tool will return an observation containing result of the action.
@@ -37,7 +37,7 @@
37
37
"thought": "I need to transform the image that I received in the previous observation to make it green.",
"thought": "I will proceed step by step and use the following tools: `document_qa` to find the oldest person in the document, then `image_generator` to generate an image according to the answer.",
62
62
"action": {
63
63
"tool_name": "document_qa",
64
-
"tool_params": {"document": "document.pdf", "question": "Who is the oldest person mentioned?"}
64
+
"tool_params": [{"name": "document"}, {"value": "document.pdf"}, {"name": "question"}, {"value": "Who is the oldest person mentioned?"}]
65
65
},
66
66
"answer": null
67
67
}
@@ -73,7 +73,7 @@
73
73
"thought": "I will now generate an image showcasing the oldest person.",
74
74
"action": {
75
75
"tool_name": "image_generator",
76
-
"tool_params": {"prompt": "A portrait of John Doe, a 55-year-old man living in Canada."}
76
+
"tool_params": [{"name": "prompt"}, {"value": "A portrait of John Doe, a 55-year-old man living in Canada."}]
77
77
},
78
78
"answer": null
79
79
}
@@ -93,7 +93,7 @@
93
93
"thought": "I will use python code evaluator to compute the result of the operation and then return the final answer using the `final_answer` tool",
0 commit comments