mirror of
https://github.com/langchain-ai/langchain-extract.git
synced 2026-07-01 20:24:03 -04:00
25 lines
514 B
Python
25 lines
514 B
Python
from __future__ import annotations
|
|
|
|
from langchain_openai import ChatOpenAI
|
|
from sqlalchemy.engine import URL
|
|
|
|
MODEL_NAME = "gpt-3.5-turbo"
|
|
CHUNK_SIZE = int(4_096 * 0.8)
|
|
# Max concurrency for the model.
|
|
MAX_CONCURRENCY = 1
|
|
|
|
|
|
def get_postgres_url():
|
|
url = URL.create(
|
|
drivername="postgresql",
|
|
username="langchain",
|
|
password="langchain",
|
|
host="localhost",
|
|
database="langchain",
|
|
port=5432,
|
|
)
|
|
return url
|
|
|
|
|
|
model = ChatOpenAI(model=MODEL_NAME, temperature=0)
|