RasaGPT  by paulpierre

Headless LLM chatbot platform built on Rasa and Langchain

created 2 years ago
2,434 stars

Top 19.5% on sourcepulse

GitHubView on GitHub
Project Summary

RasaGPT is a headless LLM chatbot platform for developers and researchers seeking to integrate large language models (LLMs) with conversational AI frameworks. It provides a reference implementation for combining Rasa, a popular open-source conversational AI framework, with Langchain and LlamaIndex for advanced retrieval and context injection, enabling custom chatbot experiences.

How It Works

RasaGPT leverages Rasa for core conversational flow and channel integration (e.g., Telegram), while Langchain and LlamaIndex handle LLM interactions, document indexing, and retrieval. User messages are routed through Rasa's NLU pipeline; unrecognized intents trigger a custom action_gpt_fallback. This action calls a FastAPI backend, which uses LlamaIndex to query an indexed corpus (stored in PostgreSQL with pgvector for efficient similarity search) and injects relevant context into an LLM prompt for response generation.

Quick Start & Requirements

  • Install: make install (for Docker) or cd app/api && make install (for local Python environment).
  • Prerequisites: Python 3.9, Docker & Docker Compose (Docker Desktop for MacOS), OpenAI API key, Telegram bot credentials, Ngrok auth token, Make.
  • Setup: The make install command automates setup, including database initialization, Rasa model training, Ngrok tunneling, and API server startup.
  • Resources: RasaGPT Dev, GitHub

Highlighted Details

  • Integrates Rasa with LLM libraries (Langchain, LlamaIndex) for advanced chatbot capabilities.
  • Utilizes PostgreSQL with pgvector for efficient semantic search and custom data schemas.
  • Provides a FastAPI backend for API access, document management, and custom endpoint creation.
  • Supports multi-tenancy and session management, features not natively present in Rasa.
  • Includes automatic Ngrok setup for Telegram webhook integration.

Maintenance & Community

  • Developed by Paul Pierre (@paulpierre).
  • Open to contributions and issues via GitHub.
  • Contact via Twitter: @paulpierre.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive license allows commercial use and integration with closed-source applications.

Limitations & Caveats

The project is explicitly stated as "far from production code" and contains potential prompt injection and security vulnerabilities. Retrieval quality is noted as "hit or miss," with significant room for optimization in indexing and LLM configuration. A TODO list includes writing tests and implementing chat history.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
23 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.