Skip to content

Commit 95535cb

Browse files
authored
fix: Update chat.cancel API to use body instead of params (#128)
- Changed chat.cancel API to accept parameters in request body instead of query params
1 parent f81395b commit 95535cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cozepy/chat/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,11 +724,11 @@ def cancel(
724724
:return:
725725
"""
726726
url = f"{self._base_url}/v3/chat/cancel"
727-
params = {
727+
body = {
728728
"conversation_id": conversation_id,
729729
"chat_id": chat_id,
730730
}
731-
return self._requester.request("post", url, False, Chat, params=params)
731+
return self._requester.request("post", url, False, Chat, body=body)
732732

733733
@property
734734
def messages(
@@ -1026,11 +1026,11 @@ async def cancel(
10261026
:return:
10271027
"""
10281028
url = f"{self._base_url}/v3/chat/cancel"
1029-
params = {
1029+
body = {
10301030
"conversation_id": conversation_id,
10311031
"chat_id": chat_id,
10321032
}
1033-
return await self._requester.arequest("post", url, False, Chat, params=params)
1033+
return await self._requester.arequest("post", url, False, Chat, body=body)
10341034

10351035
@property
10361036
def messages(

0 commit comments

Comments
 (0)