The component requires the IAIChatService to be registered in your application, please use our demos source for reference.
This service supports any OpenAI-compatible endpoint, including OpenAI, Azure OpenAI, Cloudflare AI, and other compatible providers.
For WebAssembly applications, you'll need to use a server-side proxy endpoint since browsers cannot make direct requests to external APIs due to CORS restrictions, refer to AIChatController.
The AIChat component supports conversation memory that remembers previous questions and maintains context across multiple interactions.
Use SessionId to maintain conversation state and SessionIdChanged to track session changes.