Skip to content

ameyarj/QA_RAG_CHATBOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Chatbot

Environment Setup

Set Up Environment Variables

  1. Create a .env file inside the /rag/backend/ directory.
  2. Add the following lines to the .env file:
    OPENAI_API_KEY=openai_api_key
    COHERE_API_KEY=cohere_api_key
    

Note: OPENAI_API_KEY requires credits to work and one need to purchase the credit and you can obtain the COHERE_API_KEY by going to its official webiste signing Up and generating a trial key.

Docker Setup

  1. Open Docker Desktop.

  2. Navigate to the project directory:

    cd rag
  3. Build and run the Docker containers:

    docker-compose up --build
  4. Open another terminal and navigate to the backend directory:

    cd rag/backend
  5. Find the container name:

    docker ps
  6. Access the PostgreSQL database:

    docker exec -it rag-db-1 psql -U user -d rag_chatbot

    Note: Replace rag-db-1 with your container name if it differs. The database name rag_chatbot is fixed as defined in settings.py.

  7. Run the following command in the PostgreSQL shell:

    CREATE EXTENSION IF NOT EXISTS vector;
  8. Quit the PostgreSQL shell:

    • Use Ctrl + C to exit.
  9. To Re-Run Docker if applicable

    • docker-compose up

Final Steps

Ensure that the Docker containers are running and that the API keys are correctly set in the .env file and then click on the http://localhost:3000.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors