Skip to content

Commit

Permalink
fix: Update workflow_id parameter optional in WebSocket (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
chyroc authored Mar 5, 2025
1 parent 729e41c commit 464998b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cozepy/websockets/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def __init__(
auth: Auth,
requester: Requester,
bot_id: str,
workflow_id: str,
on_event: Union[WebsocketsChatEventHandler, Dict[WebsocketsEventType, Callable]],
workflow_id: Optional[str] = None,
**kwargs,
):
if isinstance(on_event, WebsocketsChatEventHandler):
Expand Down Expand Up @@ -352,17 +352,17 @@ def create(
self,
*,
bot_id: str,
workflow_id: str,
on_event: Union[WebsocketsChatEventHandler, Dict[WebsocketsEventType, Callable]],
workflow_id: Optional[str] = None,
**kwargs,
) -> WebsocketsChatClient:
return WebsocketsChatClient(
base_url=self._base_url,
auth=self._auth,
requester=self._requester,
bot_id=bot_id,
workflow_id=workflow_id,
on_event=on_event, # type: ignore
workflow_id=workflow_id,
**kwargs,
)

Expand Down Expand Up @@ -433,8 +433,8 @@ def __init__(
auth: Auth,
requester: Requester,
bot_id: str,
workflow_id: str,
on_event: Union[AsyncWebsocketsChatEventHandler, Dict[WebsocketsEventType, Callable]],
workflow_id: Optional[str] = None,
**kwargs,
):
if isinstance(on_event, AsyncWebsocketsChatEventHandler):
Expand Down Expand Up @@ -604,16 +604,16 @@ def create(
self,
*,
bot_id: str,
workflow_id: str,
on_event: Union[AsyncWebsocketsChatEventHandler, Dict[WebsocketsEventType, Callable]],
workflow_id: Optional[str] = None,
**kwargs,
) -> AsyncWebsocketsChatClient:
return AsyncWebsocketsChatClient(
base_url=self._base_url,
auth=self._auth,
requester=self._requester,
bot_id=bot_id,
workflow_id=workflow_id,
on_event=on_event, # type: ignore
workflow_id=workflow_id,
**kwargs,
)

0 comments on commit 464998b

Please sign in to comment.