Skip to content

Commit 27f68d0

Browse files
committed
fix: fix clean chat context api response
1 parent acff1b1 commit 27f68d0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

taskingai/assistant/assistant.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,25 @@ async def a_delete_assistant(assistant_id: str) -> None:
348348
await async_api_delete_assistant(assistant_id=assistant_id)
349349

350350

351-
def clean_chat_context(assistant_id: str, chat_id: str) -> ChatCleanContextResponse:
351+
def clean_chat_context(assistant_id: str, chat_id: str) -> Message:
352352
"""
353353
Clean chat context.
354354
355355
:param assistant_id: The ID of the assistant.
356356
:param chat_id: The ID of the chat.
357357
"""
358358

359-
api_clean_chat_context(assistant_id=assistant_id, chat_id=chat_id)
359+
response = api_clean_chat_context(assistant_id=assistant_id, chat_id=chat_id)
360+
return response.data
360361

361362

362-
async def a_clean_chat_context(assistant_id: str, chat_id: str) -> ChatCleanContextResponse:
363+
async def a_clean_chat_context(assistant_id: str, chat_id: str) -> Message:
363364
"""
364365
Clean chat context in async mode.
365366
366367
:param assistant_id: The ID of the assistant.
367368
:param chat_id: The ID of the chat.
368369
"""
369370

370-
await async_api_clean_chat_context(assistant_id=assistant_id, chat_id=chat_id)
371+
response = await async_api_clean_chat_context(assistant_id=assistant_id, chat_id=chat_id)
372+
return response.data

0 commit comments

Comments
 (0)