diff --git a/allocator_bot/api.py b/allocator_bot/api.py index 01e415a..d397ab3 100644 --- a/allocator_bot/api.py +++ b/allocator_bot/api.py @@ -416,6 +416,9 @@ async def query( request: QueryRequest, token: str = Depends(get_current_user) ) -> EventSourceResponse: """Query the Allocator Bot.""" - return EventSourceResponse( - (event.model_dump() async for event in execution_loop(request)) - ) + + async def event_generator(): + async for event in execution_loop(request): + yield event.model_dump() + + return EventSourceResponse(event_generator()) diff --git a/pyproject.toml b/pyproject.toml index 6b357b7..7279fb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "allocator-bot" -version = "0.3.0" +version = "0.3.1" description = "An asset allocation bot for OpenBB that uses PyPortfolioOpt to generate efficient frontier allocations." readme = "README.md" requires-python = ">=3.10,<3.14" diff --git a/uv.lock b/uv.lock index e6f0a2f..db67117 100644 --- a/uv.lock +++ b/uv.lock @@ -118,7 +118,7 @@ wheels = [ [[package]] name = "allocator-bot" -version = "0.3.0" +version = "0.3.1" source = { editable = "." } dependencies = [ { name = "aiohttp" },