feat: add analytics demo example#344
Conversation
Adds a conversational analytics chat app in examples/analytics-demo that showcases OpenUI's chart, table, and metric card components. Uses Google Gemini SDK with mock analytics tools (revenue, sales, metrics, customers) and built-in sample data. Closes thesysdev#300 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds documentation for the analytics-demo example to the OpenUI Lang examples section, covering architecture, setup, key files, tools table, and system prompt generation. Includes a video placeholder. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@ankit-thesys, I haven't been able to test this; it is modeled on the openui-chat example. I don't yet have an API key for OpenAI. Will perhaps need your help, or if you can allow another day. |
|
https://ai.google.dev/gemini-api/docs/openai |
|
thanks @zahlekhan for this |
|
I will test it once i am little free 😄 |
|
Thank you @ankit-thesys @zahlekhan I tried using Gemini with the OpenAI SDK, in my exploration, the tool calling does not work well yet with Gemini. Gemini's streaming endpoint sends the tool calling chunks as a single completed chunk, but OpenAI SDK |
|
Not needed, let ankit test it out this time. |
Closes #300
Summary
examples/analytics-demo, a conversational analytics chat app showcasing OpenUI's chart, table, and metric card components@google/genai) with streaming and manual tool-call loopquery_revenue,query_sales,query_metrics,query_customers) with built-in sample data — works out of the box with no external data sourceexamples/openui-chatTest plan
GEMINI_API_KEYin.env.localand runpnpm devfromexamples/analytics-demopnpm -r run buildpasses for all workspace packages🤖 Generated with Claude Code
Example Screenshot: