add cd job

This commit is contained in:
2025-11-25 05:53:29 +00:00
parent 0c91c2ea5b
commit 4adf6b461e
2 changed files with 97 additions and 2 deletions

View File

@@ -6,8 +6,8 @@ from fastapi.responses import StreamingResponse
from pydantic import BaseModel
from . import services
from .config import config
from .agent import MayaInversionistas
from .config import config
@asynccontextmanager
@@ -49,5 +49,12 @@ async def send(message: Message, stream: bool = False):
generator = sse_stream(agent, message.prompt, message.conversation_id)
return StreamingResponse(generator, media_type="text/event-stream")
else:
response = await services.generate(agent, message.prompt, message.conversation_id)
response = await services.generate(
agent, message.prompt, message.conversation_id
)
return response
@app.get("/")
async def health():
return {"status": "ok"}