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. |
|
Hi! First of all, thank you for putting in the effort to create the analytical demo — we really appreciate the time and thought you invested in it. With the upcoming 0.5 release of reactlang, we’re planning to introduce a dedicated dashboard demo focused on demonstrating data fetching and refresh workflows, which will also cover analytics-related use cases more comprehensively. Because of that direction, we won’t be moving forward with this at the moment. That said, we truly appreciate the contribution and the ideas behind it — it helped us think more clearly about how we want to approach this area going forward. We hope you’ll continue contributing and sharing ideas with us! |
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: