Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

basic.json

105 lines3.0 KB

1{
2 "fixtures": [
3 {
4 "match": {
5 "userMessage": "[json-transport-structured] recommend a guitar"
6 },
7 "response": {
8 "content": "{\"name\":\"Fender Stratocaster\",\"price\":1299,\"reason\":\"Versatile tone and comfortable playability\",\"rating\":5,\"condition\":null}"
9 }
10 },
11 {
12 "match": {
13 "userMessage": "[json-transport-structured] a cheaper one"
14 },
15 "response": {
16 "content": "{\"name\":\"Squier Classic Vibe\",\"price\":449,\"reason\":\"Great value for the sound\",\"rating\":4,\"condition\":null}"
17 }
18 },
19 {
20 "match": {
21 "userMessage": "[json-transport-text] say hello"
22 },
23 "response": {
24 "content": "JSON_TEXT_OK the whole answer came back in one JSON reply."
25 }
26 },
27 {
28 "match": {
29 "userMessage": "[json-transport-long] tell me about the lighthouse",
30 "sequenceIndex": 0
31 },
32 "response": {
33 "content": "The lighthouse keeper climbed the stairs each night, trimmed the wick, wound the clockwork, and watched the beam sweep the dark water until morning came. JSON_LONG_END"
34 },
35 "chunkSize": 4,
36 "streamingProfile": { "tps": 10 }
37 },
38 {
39 "match": {
40 "userMessage": "[json-transport-server-tool] weather in san francisco",
41 "sequenceIndex": 0
42 },
43 "response": {
44 "content": "Let me get the weather for you.",
45 "toolCalls": [
46 { "name": "get_weather", "arguments": "{\"city\":\"San Francisco\"}" }
47 ]
48 }
49 },
50 {
51 "match": {
52 "userMessage": "[json-transport-server-tool] weather in san francisco",
53 "sequenceIndex": 1
54 },
55 "response": {
56 "content": "JSON_SERVER_TOOL_OK San Francisco is 72F and sunny."
57 }
58 },
59 {
60 "match": {
61 "userMessage": "[json-transport-client-tool] show a notification",
62 "sequenceIndex": 0
63 },
64 "response": {
65 "content": "I will show a notification.",
66 "toolCalls": [
67 {
68 "name": "show_notification",
69 "arguments": "{\"message\":\"Hello over JSON\",\"type\":\"info\"}"
70 }
71 ]
72 }
73 },
74 {
75 "match": {
76 "userMessage": "[json-transport-client-tool] show a notification",
77 "sequenceIndex": 1
78 },
79 "response": {
80 "content": "JSON_CLIENT_TOOL_OK the notification was shown."
81 }
82 },
83 {
84 "match": {
85 "userMessage": "[json-transport-approval] delete the temp file",
86 "sequenceIndex": 0
87 },
88 "response": {
89 "content": "I need your permission to delete this file.",
90 "toolCalls": [
91 { "name": "delete_file", "arguments": "{\"path\":\"/tmp/test.txt\"}" }
92 ]
93 }
94 },
95 {
96 "match": {
97 "userMessage": "[json-transport-approval] delete the temp file",
98 "sequenceIndex": 1
99 },
100 "response": {
101 "content": "JSON_APPROVAL_OK the file has been deleted."
102 }
103 }
104 ]