rag-chat-component  by upstash

React component for RAG-enabled AI assistant

Created 1 year ago
274 stars

Top 94.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This React component provides a pre-built, customizable chat interface for RAG-enabled AI assistants. It targets Next.js developers seeking to quickly integrate AI chat functionality, leveraging Upstash Vector for context retrieval and Together AI for LLM processing, with streaming responses via Vercel AI SDK.

How It Works

The component orchestrates a RAG pipeline by combining Upstash Vector for real-time similarity search on user-provided data, Together AI for generating responses from a chosen LLM, and the Vercel AI SDK for efficient, streamed output. This approach simplifies the integration of complex RAG workflows into frontend applications.

Quick Start & Requirements

  • Install: npm install @upstash/rag-chat-component
  • Environment Variables: UPSTASH_VECTOR_URL, UPSTASH_VECTOR_TOKEN, OPENAI_API_KEY, TOGETHER_API_KEY. Optional: UPSTASH_REDIS_URL, UPSTASH_REDIS_TOKEN, TOGETHER_MODEL.
  • Tailwind CSS configuration required in tailwind.config.ts.
  • See Upstash Console for setup.

Highlighted Details

  • Supports streaming responses, server actions, and persistent chat history.
  • Offers a responsive and customizable UI with dark/light mode support.
  • Integrates with Upstash Vector SDK, Python SDK, REST API, and a docs2vector tool for data ingestion.
  • Vercel deployment timeout can be increased via vercel.json configuration.

Maintenance & Community

  • Development is supported via a playground.
  • Roadmap includes integration with QStash for enhanced serverless function timeouts.
  • Contribution guidelines are available.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The component requires specific Upstash and Together AI API keys, and its functionality is tied to these external services. Vercel serverless function timeouts may require manual adjustment.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
4 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.