From 7d0f6cb47b77c1c9397867adb01917e76750c9a0 Mon Sep 17 00:00:00 2001 From: "gary.y" Date: Fri, 20 Sep 2024 22:01:14 +0800 Subject: [PATCH 1/5] feat(app): support converstion uid in list api --- app/app/v1alpha/conversation.proto | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/app/v1alpha/conversation.proto b/app/app/v1alpha/conversation.proto index 2ba21bc4..15eb6a9d 100644 --- a/app/app/v1alpha/conversation.proto +++ b/app/app/v1alpha/conversation.proto @@ -77,10 +77,13 @@ message ListConversationsRequest { int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // page token string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + // conversation_uid this is optional, if provided, only the conversation with the given conversation_uid will be returned + // first check conversation_uid, then check conversation_id, then check if_all + string conversation_uid = 5 [(google.api.field_behavior) = OPTIONAL]; // conversation_id this is optional, if provided, only the conversation with the given conversation_id will be returned - string conversation_id = 5 [(google.api.field_behavior) = OPTIONAL]; + string conversation_id = 6 [(google.api.field_behavior) = OPTIONAL]; // If true, all conversations will be returned. This has higher priority over conversation_id, page_size, and page_token. - bool if_all = 6 [(google.api.field_behavior) = OPTIONAL]; + bool if_all = 7 [(google.api.field_behavior) = OPTIONAL]; } // ListConversationsResponse returns a list of conversations From 4401b5a9d47becdd74343402554d8cf1882a7cce Mon Sep 17 00:00:00 2001 From: "gary.y" Date: Fri, 20 Sep 2024 22:11:03 +0800 Subject: [PATCH 2/5] feat(app): support message uid in list api --- app/app/v1alpha/conversation.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/app/v1alpha/conversation.proto b/app/app/v1alpha/conversation.proto index 15eb6a9d..4bf890ca 100644 --- a/app/app/v1alpha/conversation.proto +++ b/app/app/v1alpha/conversation.proto @@ -180,6 +180,8 @@ message ListMessagesRequest { bool include_system_messages = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // If true, all messages will be returned. This has higher priority over latest_k, page_size, and page_token. bool if_all = 8 [(google.api.field_behavior) = OPTIONAL]; + // message_uid this is optional, if provided, only the message with the given message_uid will be returned + string message_uid = 9 [(google.api.field_behavior) = OPTIONAL]; } // ListMessagesResponse returns a list of messages From f5ca7089942c78fa52c10931b80212ac3dc3a514 Mon Sep 17 00:00:00 2001 From: droplet-bot Date: Fri, 20 Sep 2024 14:13:23 +0000 Subject: [PATCH 3/5] chore: auto-gen by protobufs triggered by commit: https://github.com/instill-ai/protobufs/commit/40e09d661374b3ce20047fce87796a719e0ad463 --- openapiv2/app/service.swagger.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openapiv2/app/service.swagger.yaml b/openapiv2/app/service.swagger.yaml index 59eafde2..8b5533fe 100644 --- a/openapiv2/app/service.swagger.yaml +++ b/openapiv2/app/service.swagger.yaml @@ -174,6 +174,13 @@ paths: in: query required: false type: string + - name: conversationUid + description: |- + conversation_uid this is optional, if provided, only the conversation with the given conversation_uid will be returned + first check conversation_uid, then check conversation_id, then check if_all + in: query + required: false + type: string - name: conversationId description: conversation_id this is optional, if provided, only the conversation with the given conversation_id will be returned in: query @@ -350,6 +357,11 @@ paths: in: query required: false type: boolean + - name: messageUid + description: message_uid this is optional, if provided, only the message with the given message_uid will be returned + in: query + required: false + type: string tags: - App post: From bb784eeab53795b43cd9140d08bf64da2040265f Mon Sep 17 00:00:00 2001 From: "gary.y" Date: Sat, 21 Sep 2024 20:13:00 +0800 Subject: [PATCH 4/5] add Instill-Requeste-Uid header in file process api --- .../artifact/v1alpha/artifact_public_service.proto | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/artifact/artifact/v1alpha/artifact_public_service.proto b/artifact/artifact/v1alpha/artifact_public_service.proto index 897a2d46..f4b3320c 100644 --- a/artifact/artifact/v1alpha/artifact_public_service.proto +++ b/artifact/artifact/v1alpha/artifact_public_service.proto @@ -95,7 +95,16 @@ service ArtifactPublicService { post: "/v1alpha/catalogs/files/processAsync" body: "*" }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Catalog" + parameters: { + headers: { + name: "Instill-Requester-Uid" + description: "Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to" + type: STRING + } + } + }; } // List catalog files From 679912e3439f9f6906490281340c5a1a35df4809 Mon Sep 17 00:00:00 2001 From: droplet-bot Date: Sat, 21 Sep 2024 12:13:37 +0000 Subject: [PATCH 5/5] chore: auto-gen by protobufs triggered by commit: https://github.com/instill-ai/protobufs/commit/b4d2186fdcb26ef0f881be7331ca892276883600 --- openapiv2/artifact/service.swagger.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openapiv2/artifact/service.swagger.yaml b/openapiv2/artifact/service.swagger.yaml index 63c65304..9fe0f030 100644 --- a/openapiv2/artifact/service.swagger.yaml +++ b/openapiv2/artifact/service.swagger.yaml @@ -302,6 +302,11 @@ paths: required: true schema: $ref: '#/definitions/v1alphaProcessCatalogFilesRequest' + - name: Instill-Requester-Uid + description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to + in: header + required: false + type: string tags: - Catalog /v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks: