Files
copilotkit__copilotkit/showcase/aimock/d6/langgraph-fastapi/agentic-chat.json
Jordan Ritter dfeb06121b fix(showcase/d6): drop turnIndex:0 from multi-turn goldfish agentic-chat fixtures
The aimock matcher gates turnIndex against the request's assistant-message
count (assistantCount !== turnIndex → skip). The agno, spring-ai, and
langgraph-fastapi agentic-chat fixtures baked turnIndex:0 on all three
goldfish conversation turns. Turn 2+ carries >=1 assistant message, so
turnIndex:0 could never match those turns — aimock returned no-match and the
request fell through to proxy (503), failing the d6 cell.

Mirror the canonical clean pattern used by the other 15 frameworks
(langgraph-python et al.): omit turnIndex on the multi-turn conversation
turns and disambiguate purely by userMessage. Single-turn fixtures in the
same files keep turnIndex:0 (unchanged). Verified locally against the aimock
matcher: turn-2 goes 404→200 for all three frameworks, turn-1 unregressed.
2026-05-31 20:45:13 -07:00

116 lines
4.4 KiB
JSON

{
"_meta": {
"description": "D6 fixtures for langgraph-fastapi / agentic-chat",
"sourceFile": "d5-all.json",
"copiedFrom": "langgraph-python",
"created": "2026-05-21"
},
"fixtures": [
{
"_comment": "agentic-chat turn 1 — goldfish name. No turnIndex gate: the probe sends 3 sequential turns in one thread; turnIndex would restrict this to the first turn only, causing turns 2-3 to fall through to proxy.",
"match": {
"userMessage": "good name for a goldfish",
"context": "langgraph-fastapi"
},
"response": {
"content": "How about Bubbles? It is friendly, classic, and easy to call out at the tank. If you want alternatives: Goldie, Finley, or Mango."
}
},
{
"_comment": "agentic-chat turn 2 — tank name. No turnIndex gate (multi-turn conversation).",
"match": {
"userMessage": "name for its tank",
"context": "langgraph-fastapi"
},
"response": {
"content": "Following the Bubbles theme, you could call the tank The Bubble Bowl. It pairs naturally with the goldfish's name and keeps the playful tone."
}
},
{
"_comment": "agentic-chat turn 3 — recall. No turnIndex gate (multi-turn conversation).",
"match": {
"userMessage": "what we named the goldfish",
"context": "langgraph-fastapi"
},
"response": {
"content": "We named the goldfish Bubbles, and the tank The Bubble Bowl."
}
},
{
"match": {
"userMessage": "Write me a haiku about nature",
"hasToolResult": false,
"context": "langgraph-fastapi"
},
"response": {
"toolCalls": [
{
"id": "call_d5_generate_haiku_001",
"name": "generate_haiku",
"arguments": "{\"japanese\":[\"古池や\",\"蛙飛び込む\",\"水の音\"],\"english\":[\"An old silent pond\",\"A frog jumps into the pond\",\"Splash! Silence again.\"],\"image_name\":\"Mount_Fuji_Lake_Reflection_Cherry_Blossoms_Sakura_Spring.jpg\",\"gradient\":\"linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)\"}"
}
]
}
},
{
"match": {
"userMessage": "Write me a haiku about nature",
"hasToolResult": true,
"context": "langgraph-fastapi"
},
"response": {
"content": "Haiku generated above — a beautiful verse about nature with an accompanying image."
}
},
{
"match": {
"userMessage": "describe the sample image",
"turnIndex": 0,
"context": "langgraph-fastapi"
},
"response": {
"content": "The image attachment shows a small abstract test pattern used by the multimodal demo to validate the image-upload pipeline. Successful render of this response confirms the binary attachment round-tripped through the runtime."
}
},
{
"match": {
"userMessage": "summarize the sample document",
"turnIndex": 0,
"context": "langgraph-fastapi"
},
"response": {
"content": "The PDF document contains a single test page used by the multimodal demo. Its text was flattened by pypdf on the Python side and forwarded as text content to the model. Receiving this response confirms the document upload path works."
}
},
{
"match": {
"userMessage": "hi from the popup test",
"turnIndex": 0,
"context": "langgraph-fastapi"
},
"response": {
"content": "Hello from the popup — the CopilotPopup prebuilt component is wired up and reachable. The launcher floats in the corner and the chat sits in an overlay panel."
}
},
{
"match": {
"userMessage": "hi from the sidebar test",
"turnIndex": 0,
"context": "langgraph-fastapi"
},
"response": {
"content": "Hello from the sidebar — the CopilotSidebar prebuilt component is wired up and reachable. Anything else you would like me to confirm from inside the sidebar?"
}
},
{
"match": {
"userMessage": "analyze data and call the tool",
"turnIndex": 0,
"context": "langgraph-fastapi"
},
"response": {
"content": "Reasoning step 1: I considered the query. Reasoning step 2: I decided to invoke the analysis tool. The tool returned its structured payload, and the reasoning chain wraps the rendered tool card. Both the reasoning block and the tool card should be visible in the transcript."
}
}
]
}