Atualizar README.md
This commit is contained in:
@@ -33,3 +33,63 @@ Tudo isso dentro de uma **única conversa**, sem abas, com modos adaptativos:
|
||||
- cron jobs para monitoramento contínuo
|
||||
|
||||
---
|
||||
|
||||
# Ollama Gateway – safira.renatorosa.com
|
||||
|
||||
This project provides a simple HTTP gateway to a local Ollama instance,
|
||||
exposing multiple models (Llama 3.2, Gemma 4, and Qwen 2.5) through a
|
||||
Flask API served by Gunicorn inside Docker. The service is reachable
|
||||
over HTTP on port 80 at:
|
||||
|
||||
**https://safira.renatorosa.com**
|
||||
|
||||
Authentication is handled via Google OAuth.
|
||||
|
||||
## Overview
|
||||
|
||||
- **Backend:** Python (Flask) + Gunicorn
|
||||
- **Models:** Llama 3.2, Gemma 4, Qwen 2.5
|
||||
- **Hardware target:** Nvidia RTX 2070M GPU + 16 GB RAM
|
||||
- **Auth:** Google OAuth 2.0
|
||||
- **Runtime:** Docker + Docker Compose
|
||||
- **Port:** 80 (HTTP)
|
||||
|
||||
Both the gateway and Ollama run inside the same `docker compose` file.
|
||||
|
||||
## Environment variables
|
||||
|
||||
Create a `.env` file:
|
||||
|
||||
```
|
||||
GOOGLE_CLIENT_ID=your-google-client-id
|
||||
GOOGLE_CLIENT_SECRET=your-google-client-secret
|
||||
GOOGLE_REDIRECT_URI=https://.../oauth/callback
|
||||
FLASK_SECRET_KEY=change-this-secret
|
||||
OLLAMA_BASE_URL=http://ollama:11434
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
docker compose up --build
|
||||
|
||||
### Access:
|
||||
|
||||
https://...
|
||||
|
||||
## API
|
||||
|
||||
### POST /api/generate
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "llama3.2",
|
||||
"prompt": "Explain quantum computing simply."
|
||||
}
|
||||
Response:
|
||||
|
||||
json
|
||||
{
|
||||
"model": "llama3.2",
|
||||
"output": "..."
|
||||
}
|
||||
License
|
||||
Reference in New Issue
Block a user