Skip to content

Commit 8aff3ef

Browse files
feat(artifact): rename SimilarityChunksSearch to ViewChunks (#473)
Because - Python SDK artifact_client functions, and the documentation should be consistent to ensure clarity and ease of use. This commit - rename SimilarityChunksSearch to ViewChunks --------- Co-authored-by: droplet-bot <[email protected]>
1 parent 56f6036 commit 8aff3ef

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

artifact/artifact/v1alpha/artifact_public_service.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ service ArtifactPublicService {
133133
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
134134
}
135135

136-
// Retrieve similar chunks
137-
rpc SimilarityChunksSearch(SimilarityChunksSearchRequest) returns (SimilarityChunksSearchResponse) {
136+
// View similar chunks
137+
rpc ViewChunks(ViewChunksRequest) returns (ViewChunksResponse) {
138138
option (google.api.http) = {
139139
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/chunks/retrieve"
140140
body: "*"

artifact/artifact/v1alpha/chunk.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ message UpdateChunkResponse {
8585
Chunk chunk = 1;
8686
}
8787

88-
// Similar chunk search request
89-
message SimilarityChunksSearchRequest {
88+
// View chunks request
89+
message ViewChunksRequest {
9090
// owner/namespace id
9191
string namespace_id = 1;
9292
// catalog id
@@ -97,8 +97,8 @@ message SimilarityChunksSearchRequest {
9797
uint32 top_k = 4;
9898
}
9999

100-
// Similar chunk search response
101-
message SimilarityChunksSearchResponse {
100+
// View chunks response
101+
message ViewChunksResponse {
102102
// chunks
103103
repeated SimilarityChunk similar_chunks = 1;
104104
}

openapiv2/artifact/service.swagger.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ paths:
416416
- Catalog
417417
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks/retrieve:
418418
post:
419-
summary: Retrieve similar chunks
420-
operationId: ArtifactPublicService_SimilarityChunksSearch
419+
summary: View similar chunks
420+
operationId: ArtifactPublicService_ViewChunks
421421
responses:
422422
"200":
423423
description: A successful response.
424424
schema:
425-
$ref: '#/definitions/v1alphaSimilarityChunksSearchResponse'
425+
$ref: '#/definitions/v1alphaViewChunksResponse'
426426
"401":
427427
description: Returned when the client credentials are not valid.
428428
schema: {}
@@ -445,7 +445,7 @@ paths:
445445
in: body
446446
required: true
447447
schema:
448-
$ref: '#/definitions/ArtifactPublicServiceSimilarityChunksSearchBody'
448+
$ref: '#/definitions/ArtifactPublicServiceViewChunksBody'
449449
- name: Instill-Requester-Uid
450450
description: Indicates the authenticated namespace is making the request on behalf of another entity, typically an organization they belong to
451451
in: header
@@ -577,17 +577,6 @@ definitions:
577577
format: int32
578578
title: top k default to 5
579579
title: QuestionAnsweringRequest
580-
ArtifactPublicServiceSimilarityChunksSearchBody:
581-
type: object
582-
properties:
583-
textPrompt:
584-
type: string
585-
title: text prompt
586-
topK:
587-
type: integer
588-
format: int64
589-
title: top k
590-
title: Similar chunk search request
591580
ArtifactPublicServiceUpdateCatalogBody:
592581
type: object
593582
properties:
@@ -607,6 +596,17 @@ definitions:
607596
type: boolean
608597
title: whether the chunk is retrievable
609598
title: Create chunk response
599+
ArtifactPublicServiceViewChunksBody:
600+
type: object
601+
properties:
602+
textPrompt:
603+
type: string
604+
title: text prompt
605+
topK:
606+
type: integer
607+
format: int64
608+
title: top k
609+
title: View chunks request
610610
GetFileCatalogResponseChunkType:
611611
type: string
612612
enum:
@@ -1313,16 +1313,6 @@ definitions:
13131313
type: string
13141314
title: source file
13151315
title: similarity chunks
1316-
v1alphaSimilarityChunksSearchResponse:
1317-
type: object
1318-
properties:
1319-
similarChunks:
1320-
type: array
1321-
items:
1322-
type: object
1323-
$ref: '#/definitions/v1alphaSimilarityChunk'
1324-
title: chunks
1325-
title: Similar chunk search response
13261316
v1alphaSourceFile:
13271317
type: object
13281318
properties:
@@ -1365,6 +1355,16 @@ definitions:
13651355
allOf:
13661356
- $ref: '#/definitions/v1alphaFile'
13671357
title: upload file response
1358+
v1alphaViewChunksResponse:
1359+
type: object
1360+
properties:
1361+
similarChunks:
1362+
type: array
1363+
items:
1364+
type: object
1365+
$ref: '#/definitions/v1alphaSimilarityChunk'
1366+
title: chunks
1367+
title: View chunks response
13681368
securityDefinitions:
13691369
Bearer:
13701370
type: apiKey

0 commit comments

Comments
 (0)