diff --git a/back-end/src/router/hello_world.py b/back-end/src/router/hello_world.py index 9bf6345..87b1844 100644 --- a/back-end/src/router/hello_world.py +++ b/back-end/src/router/hello_world.py @@ -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" + )