Giter Club home page Giter Club logo

rag's Introduction

rag

Capstone project code for enterprise RAG Q&A solution

Execute python3 main.py to run the program under utils directory as it expects the rag_config.ini file in that directory. Currently it waits forever after executing the queries (to prevent docker from crashing. Manually kill it.)

rag_config.ini 'mode' has 2 modes 1. update mode and read mode when in read mode, it expects to use existing embeddings where as in update mode it creates/uses embeddings

rag_config.ini has 2 possible configurations for chroma/srvr_mode. The default srvr_mode is 'in_memory' mode (should have named it file system peristent) which is a DB created in the local directory. The other srvr_mode config is 'network' which expects a chromaDB server running somewhere (Deployment config).

Creating a application docker

  1. configure your OPENAI_API_KEY, SERPAPI_API_KEY
  2. If you want to use the existing vector index values, do not do make clean. Go to step 3
  3. make clean (cleans up the output and Chroma_DB directories if they exist)
  4. make build_docker (Note: if this fails on a mac terminal, complaining about sed, replace sed -i with sed -i "" in makefile. Some non-compatible changes between Linux and Mac)
  5. After the docker build is changed manually edit the rag_config.ini file to have mode=update (if you want to create the vector db index values). Otherwise, leave mode=read

Default port of streamlit app is 8501. You need to map it to another port for accessing the app outside container using the switch "-p 8080:8501" The app running on docker container can be accessed by using the url http://localhost:8080

How to run the docker instance (replace -d with -it for interactive running)

docker run -it -p 8080:8501 -e OPENAI_API_KEY=$OPENAI_API_KEY --name my_rag1 rag:v1

rag's People

Contributors

vanim-git avatar padalac avatar luuumity avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.