RAG with Vercel AI SDK

R
Renaudil y a 2 jours
0

Description

A retrieval-augmented generation chatbot built with Next.js, the Vercel AI SDK, Drizzle ORM, and PostgreSQL.

npx boilerapp ai-sdk-rag

文档

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.

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联络我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联络我们,我们将尽快回复。

RAG with Vercel AI SDK | BoilerApp