Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pythonhubdev/zania-backend
A FastAPI-based Question-Answering bot leveraging Langchain and large language models. Answers questions based on uploaded JSON or PDF documents, providing a structured JSON output of question-answer pairs.
https://github.com/pythonhubdev/zania-backend
Last synced: 28 days ago
JSON representation
A FastAPI-based Question-Answering bot leveraging Langchain and large language models. Answers questions based on uploaded JSON or PDF documents, providing a structured JSON output of question-answer pairs.
- Host: GitHub
- URL: https://github.com/pythonhubdev/zania-backend
- Owner: pythonhubdev
- Created: 2024-09-11T06:28:21.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T04:26:00.000Z (about 2 months ago)
- Last Synced: 2024-09-13T08:33:13.851Z (about 2 months ago)
- Language: CSS
- Size: 1.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zania Backend
A FastAPI-based Question-Answering API leveraging Langchain and large language models. Answers questions based on
uploaded JSON or PDF documents, providing a structured JSON output of question-answer pairs.# Installing UV
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```# Installing packages with uv
```bash
uv sync
```# Setting up `.env`
Add the following to your `.env.development` file:```dotenv
DEBUG=True
SECRET_KEY=
NAME="Zania Backend"
APP_LOC=zania_backend.web.application:app
HOST=0.0.0.0
PORT=8000
WEB_CONCURRENCY=1
USE_HYPERCORN=True
ENVIRONMENT=development
OPENAI_API_KEY=
LOG_LEVEL=20
```# Running the server
```bash
uv run python -m src
```# View the Docs in two formats
1. http://0.0.0.0:8000/api/docs - Swagger
2. http://0.0.0.0:8000/api/scalar - Scalar