fix delete chat bug
This commit is contained in:
@@ -495,8 +495,9 @@ class AsyncChatClient(AsyncFastGPTClient):
|
||||
Returns:
|
||||
httpx.Response object
|
||||
"""
|
||||
params = {"appId": appId, "chatId": chatId, "contentId": contentId}
|
||||
return await self._send_request("DELETE", "/api/core/chat/item/delete", params=params)
|
||||
# Try using JSON body first (some APIs prefer this for DELETE)
|
||||
data = {"appId": appId, "chatId": chatId, "contentId": contentId}
|
||||
return await self._send_request("DELETE", "/api/core/chat/item/delete", json=data)
|
||||
|
||||
async def send_feedback(
|
||||
self,
|
||||
|
||||
@@ -431,8 +431,9 @@ class ChatClient(FastGPTClient):
|
||||
Returns:
|
||||
httpx.Response object
|
||||
"""
|
||||
params = {"appId": appId, "chatId": chatId, "contentId": contentId}
|
||||
return self._send_request("DELETE", "/api/core/chat/item/delete", params=params)
|
||||
# Try using JSON body first (some APIs prefer this for DELETE)
|
||||
data = {"appId": appId, "chatId": chatId, "contentId": contentId}
|
||||
return self._send_request("DELETE", "/api/core/chat/item/delete", json=data)
|
||||
|
||||
def send_feedback(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user