Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
korpogPublic archive

About

REST API using RAG

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

1. What is this?

REST API created with FastAPI, OpenAI API and LangChain (for RAG). Ask questions concerning David Hume's A Treatise of Human Nature.

App performs semantic search on the book and using retrieved context pieces generates answers to your questions.

2. How to run

Clone/download this repository and create .env file in project directory. It should look like this

ENVIRONMENT = "production" (or "development")
OPENAI_API_KEY="your_key"
MODEL_TEMPERATURE = 0.3
AUTH_SECRET_KEY = "auth_secret_key" (use 'openssl rand -hex 32' to generate)
LANGCHAIN_API_KEY="your_key"
LANGCHAIN_TRACING_V2="true"

2.1 Without Docker [on Linux]

Install uv

Open terminal in your project directory and run the following command

uv run -- fastapi run src/main.py

2.2 With Docker

In your project directory:

docker build -t firstchain .

docker run --env-file .env -p 8000:8000 firstchain

API Response

About

REST API using RAG

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages