fix delete chat bug

This commit is contained in:
Xin Wang
2026-01-08 17:36:04 +08:00
parent f1bd12353a
commit a4713456ad
5 changed files with 118 additions and 57 deletions

View File

@@ -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,