Skip to content

Mugen0815/simple_rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple python-image with 2 scripts:

  1. Read pdf-files in DATA_PATH into chroma vector-db
  2. Query OpenAI-Api with results from db as context

Example compose-file:

version: '3'

services:
  app:
    build:
      context: .
    command: tail -f /dev/null
    environment:
      - DATA_PATH=${DATA_PATH}
      - OPENAI_API_KEY=${OPENAI_API_KEY}

create .env-file:

cp .env.example .env

then insert your Openai-api-key

Start container:

docker compose up -d

Read files into db:

docker exec -it simple_rag_app_1 sh -c "python create_db.py"

Query db and openai-api:

docker exec -it simple_rag_app_1 sh -c "python query.py \"What is zend php?\""

About

simple rag-example using langchain and chroma

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published