https://github.com/pjecz/pjecz-hercules-cli
CLI (Command Line Interface) para trabajar con RAG (Retrieval-Augmented Generation) y enviar los resultados a la API OAuth2 de Hercules
https://github.com/pjecz/pjecz-hercules-cli
fastapi python sqlalchemy
Last synced: 4 months ago
JSON representation
CLI (Command Line Interface) para trabajar con RAG (Retrieval-Augmented Generation) y enviar los resultados a la API OAuth2 de Hercules
- Host: GitHub
- URL: https://github.com/pjecz/pjecz-hercules-cli
- Owner: PJECZ
- License: agpl-3.0
- Created: 2025-01-05T17:33:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-04T14:19:30.000Z (about 1 year ago)
- Last Synced: 2025-12-26T20:58:28.770Z (6 months ago)
- Topics: fastapi, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pjecz-hercules-cli
CLI (Command Line Interface) para trabajar con RAG (Retrieval-Augmented Generation) y enviar los resultados a la API OAuth2 de Hercules
## Instalación
Crear el entorno virtual con **Python 3.11**
```bash
python3.11 -m venv .venv
```
Ingresar al entorno virtual
```bash
. .venv/bin/activate
```
Actualizar e instalar **poetry 2**
```bash
pip install --upgrade pip setuptools wheel poetry
```
Crear un archivo para las variables de entorno
```bash
nano .env
```
Escriba las siguientes variables cambiándolas a sus requerimientos
```ini
# Ollama
OPENAI_API_KEY="NONE"
OPENAI_ENDPOINT="http://127.0.0.1:11434/v1"
OPENAI_MODEL="dolphin-mistral"
OPENAI_ORG_ID="NONE"
OPENAI_PROJECT_ID="NONE"
OPENAI_PROMPT=""
# API OAuth2
API_BASE_URL="http://localhost:8000"
USERNAME="nombre@servidor.com"
PASSWORD="XXXXXXXXXXXXXXXX"
LIMIT=100
TIMEOUT=20
# Edictos
EDICTOS_BASE_DIR="/mnt/unidad/archivista/Edictos"
EDICTOS_GCS_BASE_URL="https://storage.googleapis.com/XXXX/XXXX"
# Sentencias
SENTENCIAS_BASE_DIR="/mnt/unidad/archivista/Sentencias"
SENTENCIAS_GCS_BASE_URL="https://storage.googleapis.com/XXXX/XXXX"
```
Instalar en este entorno el comando `hercules`
```bash
pip install --editable .
```
Probar que funcione el CLI
```bash
hercules --help
```