Feat: Se mueven archivos a APP

This commit is contained in:
sinergia 2024-11-01 17:57:44 -05:00
parent a5e9f2db81
commit 4be1115e3a
31 changed files with 1171 additions and 2 deletions

View File

@ -14,6 +14,8 @@ RUN poetry install --no-interaction --no-ansi --no-root
COPY ./app ./app
RUN pip3 install -r ./app/requirements.txt
RUN poetry install --no-interaction --no-ansi
EXPOSE 8080

View File

View File

@ -1,9 +1,13 @@
from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from langchain.chat_models import ChatOpenAI
from langserve import add_routes
app = FastAPI()
llm = ChatOpenAI(
model="gpt-4o-mini",
temperature=0.9
)
@app.get("/")
async def redirect_root_to_docs():
@ -11,7 +15,11 @@ async def redirect_root_to_docs():
# Edit this to add the chain you want to add
add_routes(app, NotImplemented)
add_routes(
app,
llm,
path="/openai"
)
if __name__ == "__main__":
import uvicorn

1159
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff