Update json endpoint

This commit is contained in:
user 2024-10-31 16:40:41 +01:00
parent ed2bf02a58
commit 2f45d49ac0
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
from fastapi import APIRouter
from fastapi.responses import StreamingResponse
from src.generators import conversation_streamer
from src.generators import conversation_streamer, json_streamer
router = APIRouter()
@ -19,6 +19,7 @@ async def talk():
@router.get("/json")
async def json_streamer():
# Your solution here
pass
async def json():
return StreamingResponse(
content=json_streamer(), media_type="text/event-stream"
)