Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 2.07 KB

README.md

File metadata and controls

56 lines (39 loc) · 2.07 KB

simple-rag-chat

CodeFactor GitHub Actions Workflow Status GitHub License

This is a simple retrieval-augmented generation (RAG) chat application using OpenAI, Chainlit, Langchain, and Chroma.

The app provides an chat interface that asks user to upload PDF or text documents and then allows the user to ask questions against the provided documents. It uses OpenAI's API for the chat and embedding models, Langchain for the framework, Chainlit as the fullstack interface, and Chroma for the vector database.

Interface

The following is an example chat using Gap Q1 2023 Earnings Release as the uploaded PDF:

Chat Interface

🧰 Stack

👉 Getting Started

We use Python Poetry for managing virtual environments and we recommend using pyenv to manage Python versions.

Install and start the Poetry shell as follows.

poetry install
poetry shell

Please create an .env file from .env.sample once the application is installed. Edit the .env file with your OpenAI org and OpenAI key.

cp .env.sample .env

⏯️ Run the Application

Run the application by:

chainlit run app/app.py -w

🛠️ Development

Install pre-commit

pre-commit install
pre-commit install-hooks

LICENSE

This repository is an extension of llm-pdf-qa-workshop by Hanchung Lee, licensed under GPLv3.