Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
jankrepl committed Nov 19, 2024
1 parent 825d630 commit 95400a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions swarm_copy/app/routers/approvals.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ApprovalContent(BaseModel):
"""Schema for approval content."""

status: Literal["approved", "declined", "pending"]
kwargs: str
parameters: str


class ApprovalOut(BaseModel):
Expand Down Expand Up @@ -125,7 +125,7 @@ async def update_approval(

# Update status while preserving kwargs
new_content = ApprovalContent(
status=update.status, kwargs=current_content["kwargs"]
status=update.status, parameters=current_content["parameters"]
)

# Save updated content and restore TTL
Expand Down
2 changes: 1 addition & 1 deletion swarm_copy/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def stream_agent_response(
) -> AsyncIterator[str]:
"""Redefine fastAPI connections to enable streaming."""
if isinstance(agents_routine.client, AsyncOpenAI):
connected_agents_routine = AgentsRoutine(
connected_agents_routine = AgentsRoutine( # type: ignore[call-arg]
client=AsyncOpenAI(api_key=agents_routine.client.api_key)
)
else:
Expand Down

0 comments on commit 95400a0

Please sign in to comment.