Fix: postgres history
This commit is contained in:
parent
79fc769052
commit
69b93d6bc9
Binary file not shown.
10
app.py
10
app.py
|
|
@ -7,6 +7,16 @@ import uuid
|
||||||
import ollama
|
import ollama
|
||||||
from qdrant_client import AsyncQdrantClient
|
from qdrant_client import AsyncQdrantClient
|
||||||
from qdrant_client.models import PointStruct, Distance, VectorParams
|
from qdrant_client.models import PointStruct, Distance, VectorParams
|
||||||
|
from chainlit.data.sql_alchemy import SQLAlchemyDataLayer
|
||||||
|
|
||||||
|
# --- CONFIGURAZIONE DATABASE (PostgreSQL) ---
|
||||||
|
# Assicurati che user/password coincidano con il tuo docker-compose.yml
|
||||||
|
# Sintassi: postgresql+asyncpg://user:password@host:port/dbname
|
||||||
|
DATABASE_URL = "postgresql+asyncpg://user:password@postgres:5432/ai_station"
|
||||||
|
|
||||||
|
# Attiviamo il salvataggio su DB
|
||||||
|
cl.data_layer = SQLAlchemyDataLayer(conn_string=DATABASE_URL)
|
||||||
|
# -
|
||||||
|
|
||||||
# --- CONFIGURAZIONE HARD-CODED ---
|
# --- CONFIGURAZIONE HARD-CODED ---
|
||||||
OLLAMA_URL = "http://192.168.1.243:11434"
|
OLLAMA_URL = "http://192.168.1.243:11434"
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@ ollama
|
||||||
asyncpg
|
asyncpg
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
qdrant-client
|
qdrant-client
|
||||||
|
sqlalchemy
|
||||||
Loading…
Reference in New Issue