Quickstarts
SvelteKit
GitHub Repository
You can find the project source code on GitHub.
This guide provides detailed, step-by-step instructions on how to use Upstash RAG Chat with SvelteKit. You can also explore our SvelteKit example for detailed, end-to-end examples and best practices.
Project Setup
Create a new SvelteKit application and install @upstash/rag-chat
package.
Setup Upstash Vector
Create a Vector index using Upstash Console or Upstash CLI and copy the UPSTASH_VECTOR_REST_URL
and UPSTASH_VECTOR_REST_TOKEN
into your .env
file.
.env
Setup QStash LLM
Navigate to QStash Console and copy the QSTASH_TOKEN
into your .env
file.
.env
Create a SvelteKit Handler
Create /src/routes/chat/+server.ts
:
/src/routes/chat/+server.ts
Run
Run the SvelteKit application:
Visit http://localhost:5173/chat