Skip to content

Commit

Permalink
fix: Update chat.cancel API to use body instead of params (#128)
Browse files Browse the repository at this point in the history
- Changed chat.cancel API to accept parameters in request body instead
of query params
  • Loading branch information
chyroc authored Dec 9, 2024
1 parent f81395b commit 95535cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cozepy/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,11 @@ def cancel(
:return:
"""
url = f"{self._base_url}/v3/chat/cancel"
params = {
body = {
"conversation_id": conversation_id,
"chat_id": chat_id,
}
return self._requester.request("post", url, False, Chat, params=params)
return self._requester.request("post", url, False, Chat, body=body)

@property
def messages(
Expand Down Expand Up @@ -1026,11 +1026,11 @@ async def cancel(
:return:
"""
url = f"{self._base_url}/v3/chat/cancel"
params = {
body = {
"conversation_id": conversation_id,
"chat_id": chat_id,
}
return await self._requester.arequest("post", url, False, Chat, params=params)
return await self._requester.arequest("post", url, False, Chat, body=body)

@property
def messages(
Expand Down

0 comments on commit 95535cb

Please sign in to comment.