From 105b524b5d28898a91de021095899561a5e5141e Mon Sep 17 00:00:00 2001 From: userpj Date: Tue, 18 Feb 2025 17:47:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E8=B8=A9=E7=82=B9=E8=B5=9Etype?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=9D=9E=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/appbuilder/app_builder_client_data.go | 2 +- python/core/console/appbuilder_client/appbuilder_client.py | 2 +- python/core/console/appbuilder_client/data_class.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/appbuilder/app_builder_client_data.go b/go/appbuilder/app_builder_client_data.go index 059bd76c..68e74d3c 100644 --- a/go/appbuilder/app_builder_client_data.go +++ b/go/appbuilder/app_builder_client_data.go @@ -72,7 +72,7 @@ type AppBuilderClientFeedbackRequest struct { AppID string `json:"app_id"` ConversationID string `json:"conversation_id"` MessageID string `json:"message_id"` - Type string `json:"type,omitempty"` + Type string `json:"type"` Flag []string `json:"flag,omitempty"` Reason string `json:"reason,omitempty"` } diff --git a/python/core/console/appbuilder_client/appbuilder_client.py b/python/core/console/appbuilder_client/appbuilder_client.py index 0f6d24ca..fd118e7c 100644 --- a/python/core/console/appbuilder_client/appbuilder_client.py +++ b/python/core/console/appbuilder_client/appbuilder_client.py @@ -322,7 +322,7 @@ def feedback( self, conversation_id: str, message_id: str, - type: str = None, + type: str, flag: list[str] = None, reason: str = None, ): diff --git a/python/core/console/appbuilder_client/data_class.py b/python/core/console/appbuilder_client/data_class.py index 77297ce4..53f7a6de 100644 --- a/python/core/console/appbuilder_client/data_class.py +++ b/python/core/console/appbuilder_client/data_class.py @@ -380,8 +380,8 @@ class FeedbackRequest(BaseModel): app_id: str = Field(..., description="应用ID") conversation_id: str = Field(..., description="对话ID") message_id: str = Field(..., description="对应的消息ID") - type: Optional[str] = Field( - None, + type: str = Field( + ..., description="点赞点踩枚举值 cancel:取消评论, upvote:点赞, downvote:点踩", ) flag: Optional[list[str]] = Field(