I am confused about the demo. Is the AI generating the `Weather` component that is used to render the response, or is it just returning the weather in a structure that the `Weather` component expects?
The example code is confusing me, because there is a `render()` method that references both `<Weather>` and `<Spinner>`, but neither of these JSX components are imported into the script. (In fact, `getWeather()` isn't defined, either.) Is that the part I'm missing? The LLM will just see these component references and know how to render them? Or is the codeblock wrong? Because this is technically invalid syntax (reference to undefined).
The AI is calling a function (https://platform.openai.com/docs/guides/function-calling) that is mapped to developer-controlled logic. The easiest thing to do is render specific UIs for every function call, but you can render however you'd like.
The example code is confusing me, because there is a `render()` method that references both `<Weather>` and `<Spinner>`, but neither of these JSX components are imported into the script. (In fact, `getWeather()` isn't defined, either.) Is that the part I'm missing? The LLM will just see these component references and know how to render them? Or is the codeblock wrong? Because this is technically invalid syntax (reference to undefined).