Skip to content

singlestore-labs/demo-rag-knowledge-base

Repository files navigation

Demo: RAG Knowledge Base

Getting Started

  1. Create and active a Python virtual environment by running the following commands:
python3 -m venv ./.venv
source ./.venv/bin/activate
  1. Install required dependencies by runing the following command:
pip install singlestoredb langchain langchain-community langchain-openai openai pypdf ijson "fastapi[standard]" python-dotenv
  1. Create a .env file in the root of the project based on the .env.example file.
  2. Place a PDF, Markdown, or TXT file that you want to use as your knowledge base into the directory you just created.
  3. Create tables by running the following command:
python ./create_tables.py
  1. Create embeddings by running the following command:
python ./create_embeddings.py
  1. Load embeddings by running the following command:
python ./load_embeddings.py
  1. Run the app:
python ./app.py
  1. Open http://localhost:8000/docs in your browser and test the /ask API endpoint.

Start With SingleStore – $600 in Free Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages