From 20ce7ed36704978a8a1f785e2e72efd46d3428e8 Mon Sep 17 00:00:00 2001 From: "gary.y" Date: Wed, 2 Oct 2024 16:57:47 +0800 Subject: [PATCH 1/2] feat(app): add topk and catalog in conv message --- app/app/v1alpha/conversation.proto | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/app/v1alpha/conversation.proto b/app/app/v1alpha/conversation.proto index 70f5c361..e9c0e4f4 100644 --- a/app/app/v1alpha/conversation.proto +++ b/app/app/v1alpha/conversation.proto @@ -20,10 +20,14 @@ message Conversation { string app_id = 3 [(google.api.field_behavior) = REQUIRED]; // conversation id/name string id = 4 [(google.api.field_behavior) = REQUIRED]; + // last used catalog uid + optional string last_used_catalog_uid = 5 [(google.api.field_behavior) = OPTIONAL]; + // last used top k + optional uint32 last_used_top_k = 6 [(google.api.field_behavior) = OPTIONAL]; // creation time of the conversation - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // update time of the conversation - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Message represents a single message in a conversation @@ -109,7 +113,11 @@ message UpdateConversationRequest { // conversation id string conversation_id = 3 [(google.api.field_behavior) = REQUIRED]; // new conversation id - string new_conversation_id = 4 [(google.api.field_behavior) = REQUIRED]; + optional string new_conversation_id = 4 [(google.api.field_behavior) = OPTIONAL]; + // last used catalog uid + optional string last_used_catalog_uid = 5 [(google.api.field_behavior) = OPTIONAL]; + // last used top k + optional uint32 last_used_top_k = 6 [(google.api.field_behavior) = OPTIONAL]; } // UpdateConversationResponse returns the updated conversation From 51ed369dad2b6352f95b2c15d95ba58d0b55fe21 Mon Sep 17 00:00:00 2001 From: droplet-bot Date: Wed, 2 Oct 2024 09:00:59 +0000 Subject: [PATCH 2/2] chore: auto-gen by protobufs triggered by commit: https://github.com/instill-ai/protobufs/commit/ccc4835e0db697ff3684ed07ad0b150234c7a325 --- openapiv2/app/service.swagger.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/openapiv2/app/service.swagger.yaml b/openapiv2/app/service.swagger.yaml index decff50b..e4598bd1 100644 --- a/openapiv2/app/service.swagger.yaml +++ b/openapiv2/app/service.swagger.yaml @@ -748,9 +748,14 @@ definitions: newConversationId: type: string title: new conversation id + lastUsedCatalogUid: + type: string + title: last used catalog uid + lastUsedTopK: + type: integer + format: int64 + title: last used top k title: UpdateConversationRequest is used to update a conversation - required: - - newConversationId AppPublicServiceUpdateMessageBody: type: object properties: @@ -925,6 +930,13 @@ definitions: id: type: string title: conversation id/name + lastUsedCatalogUid: + type: string + title: last used catalog uid + lastUsedTopK: + type: integer + format: int64 + title: last used top k createTime: type: string format: date-time