Skip to content

besimali/rag-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

  1. Create a .env file in the project root and add the following environment variables:

    OPENAI_API_KEY=your_api_key_here
    API_SECRET_TOKEN=secret-token
    DATABASE_URL=postgresql://user:password@db:5432/vectordb
    
  2. Build and run the Docker containers using Docker Compose:

    docker-compose up --build
    
  3. The API will be available at http://localhost:8000

Usage

To ask a question, send a POST request to the /ask-question endpoint:

curl -X POST "http://localhost:8000/ask-question" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer secret-token" \
-d '{"user_question": "How do I change to dark theme?"}'

About

Toy example using langchain and pgvector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published