Skip to content

Commit

Permalink
fix: Minor fixes for typecheck
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Oct 4, 2024
1 parent c3afa8f commit 28f66b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion agents-api/agents_api/routers/agents/list_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ async def list_agents(
offset=offset,
sort_by=sort_by,
direction=direction,
metadata_filter=metadata_filter.model_dump(mode="json"),
metadata_filter=metadata_filter.model_dump(mode="json")
if metadata_filter
else {},
)

return ListResponse[Agent](items=agents)
8 changes: 6 additions & 2 deletions agents-api/agents_api/routers/docs/list_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ async def list_user_docs(
offset=offset,
sort_by=sort_by,
direction=direction,
metadata_filter=metadata_filter.model_dump(mode="json"),
metadata_filter=metadata_filter.model_dump(mode="json")
if metadata_filter
else {},
)

return ListResponse[Doc](items=docs)
Expand All @@ -58,7 +60,9 @@ async def list_agent_docs(
offset=offset,
sort_by=sort_by,
direction=direction,
metadata_filter=metadata_filter.model_dump(mode="json"),
metadata_filter=metadata_filter.model_dump(mode="json")
if metadata_filter
else {},
)

return ListResponse[Doc](items=docs)
4 changes: 3 additions & 1 deletion agents-api/agents_api/routers/sessions/list_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ async def list_sessions(
offset=offset,
sort_by=sort_by,
direction=direction,
metadata_filter=metadata_filter.model_dump(mode="json"),
metadata_filter=metadata_filter.model_dump(mode="json")
if metadata_filter
else {},
)

return ListResponse[Session](items=sessions)

0 comments on commit 28f66b7

Please sign in to comment.