mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
2810f36df6
The 6 OpenAI drop-in integration examples enabled for the CLI's keyless AIMock mock mode shipped fixtures that did not cover the prompts each starter's own UI suggests, so a keyless first-run user clicking the demo suggestions mostly hit the generic catch-all. Re-key/extend each example's fixtures/default.json (substring, most-specific-first, catch-all last) so the surfaced suggestions return scripted replies. ENT-1003.
35 lines
1.5 KiB
JSON
35 lines
1.5 KiB
JSON
{
|
|
"fixtures": [
|
|
{
|
|
"match": { "userMessage": "Hello" },
|
|
"response": {
|
|
"content": "Hello! I'm the llamaindex AI assistant. How can I help you?"
|
|
}
|
|
},
|
|
{
|
|
"match": { "userMessage": "theme to orange" },
|
|
"response": {
|
|
"content": "Sure! I'll change the background to orange for you. 🎨 I'm calling the `change_theme_color` tool with `#f97316` (a nice orange). You should see the app background update in real-time."
|
|
}
|
|
},
|
|
{
|
|
"match": { "userMessage": "proverb about AI" },
|
|
"response": {
|
|
"content": "Here's a proverb about AI: \"A wise AI knows what it doesn't know.\" I'm adding it to the proverbs list via the `add_proverb` tool — you should see it appear on the page momentarily."
|
|
}
|
|
},
|
|
{
|
|
"match": { "userMessage": "weather in SF" },
|
|
"response": {
|
|
"content": "Let me check the weather in San Francisco for you! 🌤️ According to my data, the weather in San Francisco is sunny and 70 degrees. Perfect weather for a stroll along the Embarcadero!"
|
|
}
|
|
},
|
|
{
|
|
"match": {},
|
|
"response": {
|
|
"content": "You're currently running against aimock (a mock LLM server). This response is a catch-all for requests that don't match any test fixture. To use a real LLM: (1) Add your OPENAI_API_KEY to .env, (2) Remove or unset OPENAI_BASE_URL from your environment so requests go to OpenAI instead of aimock, (3) Restart with `pnpm dev`."
|
|
}
|
|
}
|
|
]
|
|
}
|