Integrations
Next.js
Next.js Route Handlers
RAGChat integrates with Next.js route handlers out of the box. See our example project for a complete view.
Here’s how to use it:
Basic usage
Streaming responses
To stream the response from a route handler:
On the frontend, you can read the streamed data like this:
Next.js Server Actions
RAGChat supports Next.js server actions natively. See our example project on GitHub.
First, define your server action:
Second, use the server action in your client component:
Was this page helpful?