fix: Retrieve the dialogue record list document and confirm the parameters (#2479)

This commit is contained in:
shaohuzhang1 2025-03-04 14:13:36 +08:00 committed by GitHub
parent c65ef97301
commit 9d5f9fde62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 17 additions and 3 deletions

View File

@ -472,7 +472,7 @@ class ChatRecordSerializer(serializers.Serializer):
class Query(serializers.Serializer): class Query(serializers.Serializer):
application_id = serializers.UUIDField(required=True) application_id = serializers.UUIDField(required=True)
chat_id = serializers.UUIDField(required=True) chat_id = serializers.UUIDField(required=True)
order_asc = serializers.BooleanField(required=False) order_asc = serializers.BooleanField(required=False, allow_null=True)
def list(self, with_valid=True): def list(self, with_valid=True):
if with_valid: if with_valid:

View File

@ -284,6 +284,11 @@ class ChatRecordApi(ApiMixin):
type=openapi.TYPE_STRING, type=openapi.TYPE_STRING,
required=True, required=True,
description=_('Conversation ID')), description=_('Conversation ID')),
openapi.Parameter(name='order_asc',
in_=openapi.IN_QUERY,
type=openapi.TYPE_BOOLEAN,
required=False,
description=_('Is it ascending order')),
] ]
@staticmethod @staticmethod

View File

@ -6764,3 +6764,6 @@ msgstr ""
msgid "The network is busy, try again later." msgid "The network is busy, try again later."
msgstr "" msgstr ""
msgid "Is it ascending order"
msgstr ""

View File

@ -6903,3 +6903,6 @@ msgstr "AI 回复: "
msgid "The network is busy, try again later." msgid "The network is busy, try again later."
msgstr "网络繁忙,请稍后再试。" msgstr "网络繁忙,请稍后再试。"
msgid "Is it ascending order"
msgstr "是否升序"

View File

@ -6915,3 +6915,6 @@ msgstr "AI 回覆: "
msgid "The network is busy, try again later." msgid "The network is busy, try again later."
msgstr "網絡繁忙,請稍後再試。" msgstr "網絡繁忙,請稍後再試。"
msgid "Is it ascending order"
msgstr "是否昇冪"