Home
Softono

Ai Sdk Preview Rag

Open source MIT TypeScript
408
Stars
84
Forks
4
Issues
3
Watchers
3 months
Last Commit

 About Ai Sdk Preview Rag

Retrieval-augmented generation (RAG) template powered by the AI SDK.

Platforms

Web Self-hosted

Languages

TypeScript

Need Help Installing Ai Sdk Preview Rag?

We provide expert installation service for this software. Our team will install, configure, and secure Ai Sdk Preview Rag on your server. plans start at just $30.

Ai Sdk Preview Rag

View on GitHub

AI SDK RAG Template

Deploy with Vercel

A Next.js application, powered by the Vercel AI SDK, that uses retrieval-augmented generation (RAG) to reason and respond with information outside of the model's training data.

Features

  • Information retrieval and addition through tool calls using the streamText function
  • Real-time streaming of model responses to the frontend using the useChat hook
  • Vector embedding storage with DrizzleORM and PostgreSQL
  • Animated UI with Framer Motion

Getting Started

To get the project up and running, follow these steps:

  1. Install dependencies:

    npm install
    
  2. Copy the example environment file:

    cp .env.example .env
    
  3. Add your Vercel AI Gateway API key and PostgreSQL connection string to the .env file:

    AI_GATEWAY_API_KEY=your_api_key_here
    DATABASE_URL=your_postgres_connection_string_here
    
  4. Migrate the database schema:

    npm run db:migrate
    
  5. Start the development server:

    npm run dev
    

Your project should now be running on http://localhost:3000.