kyegomez / swarms

The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework Join our Community: https://discord.com/servers/agora-999382051935506503
https://docs.swarms.world
GNU Affero General Public License v3.0
1.81k stars 248 forks source link

Chatbot-with-vllm-support #570

Closed auxon closed 2 months ago

auxon commented 3 months ago

A Retrieval Augmented Generation enabled chatbot built using Swarms Agents demo, using local LLMs, vLLM, Firecrawl, Redis for Vector Storage.

This Chatbot demonstrates how you can make a conversational retrieval augmented generative AI chatbot using Swarms. It is setup to run locally using vLLM on Linux or WSL, but can be modified to run on other systems or use OpenAI, or others as required, and eventually this demo will be modified to make it easier to switch between any Swarms supported model. This demo is hardcoded to use the Swarms official documention as input in the form of a URL, and expects the pages to be Markdown, so it uses a Markdown parser called Firecrawl which scrapes each of the Markdown pages in the documentation and stores it in Redis vector storage after splitting.

Dependencies:

  1. Linux or WSL with Docker, for local vLLM support (TODO: Allow any model supported by Swarms).
  2. Firecrawl and Redis-Stack. Follow README.md instructions for installation and usage guides.
  3. Node.js for the Chatbot-UI which is a NextJS application. May also be run in a docker container.
  4. pip install -r requirements.txt should contain the requirements for the chatbot API server which is located in swarms/playground/demos/chatbot/server

There's quite a bit of initial setup which is why I made a Lightning Studio environment you can test things out in, it's available at: https://lightning.ai/entangleit/studios/swarms-doc-chatbot-demo

@kyegomez @nicorne