mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8d0bc3cd93
hasToolResult checks whether tool-role messages exist in the request, correctly disambiguating multi-turn fixtures regardless of the backend AG-UI implementation's re-invocation behavior.
38 lines
1.1 KiB
JSON
38 lines
1.1 KiB
JSON
{
|
|
"_comment": "D5 multi-turn fixture for /demos/shared-state-read-write. Uses hasToolResult matching: aimock checks for role:tool messages in the request to disambiguate multi-turn fixtures sharing the same userMessage. The 'favorite color' fixture has a unique userMessage and needs no hasToolResult. Fixtures ordered by hasToolResult false→true for readability.",
|
|
"fixtures": [
|
|
{
|
|
"match": {
|
|
"userMessage": "remember that my favorite color is blue",
|
|
"hasToolResult": false
|
|
},
|
|
"response": {
|
|
"toolCalls": [
|
|
{
|
|
"id": "call_d5_set_notes_001",
|
|
"name": "set_notes",
|
|
"arguments": "{\"notes\":[\"Favorite color: blue\"]}"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"match": {
|
|
"userMessage": "remember that my favorite color is blue",
|
|
"hasToolResult": true
|
|
},
|
|
"response": {
|
|
"content": "Got it — I have noted that your favorite color is blue."
|
|
}
|
|
},
|
|
{
|
|
"match": {
|
|
"userMessage": "favorite color"
|
|
},
|
|
"response": {
|
|
"content": "Your favorite color is blue — I noted it earlier."
|
|
}
|
|
}
|
|
]
|
|
}
|