Skip to content

Commit

Permalink
fix(artifact): rename ViewChunks to SimilarityChunksSearch (#474)
Browse files Browse the repository at this point in the history
Reverts #473

Because

accidentally there was a misundersatnding regarding the revising
document requirement.

This commit 

revert the change.
  • Loading branch information
Yougigun authored Sep 27, 2024
1 parent 8aff3ef commit 329f572
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions artifact/artifact/v1alpha/artifact_public_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// View similar chunks
rpc ViewChunks(ViewChunksRequest) returns (ViewChunksResponse) {
// Retrieve similar chunks
rpc SimilarityChunksSearch(SimilarityChunksSearchRequest) returns (SimilarityChunksSearchResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/chunks/retrieve"
body: "*"
Expand Down
8 changes: 4 additions & 4 deletions artifact/artifact/v1alpha/chunk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ message UpdateChunkResponse {
Chunk chunk = 1;
}

// View chunks request
message ViewChunksRequest {
// Similar chunk search request
message SimilarityChunksSearchRequest {
// owner/namespace id
string namespace_id = 1;
// catalog id
Expand All @@ -97,8 +97,8 @@ message ViewChunksRequest {
uint32 top_k = 4;
}

// View chunks response
message ViewChunksResponse {
// Similar chunk search response
message SimilarityChunksSearchResponse {
// chunks
repeated SimilarityChunk similar_chunks = 1;
}
Expand Down
50 changes: 25 additions & 25 deletions openapiv2/artifact/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks/retrieve:
post:
summary: View similar chunks
operationId: ArtifactPublicService_ViewChunks
summary: Retrieve similar chunks
operationId: ArtifactPublicService_SimilarityChunksSearch
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v1alphaViewChunksResponse'
$ref: '#/definitions/v1alphaSimilarityChunksSearchResponse'
"401":
description: Returned when the client credentials are not valid.
schema: {}
Expand All @@ -445,7 +445,7 @@ paths:
in: body
required: true
schema:
$ref: '#/definitions/ArtifactPublicServiceViewChunksBody'
$ref: '#/definitions/ArtifactPublicServiceSimilarityChunksSearchBody'
- 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
Expand Down Expand Up @@ -577,6 +577,17 @@ definitions:
format: int32
title: top k default to 5
title: QuestionAnsweringRequest
ArtifactPublicServiceSimilarityChunksSearchBody:
type: object
properties:
textPrompt:
type: string
title: text prompt
topK:
type: integer
format: int64
title: top k
title: Similar chunk search request
ArtifactPublicServiceUpdateCatalogBody:
type: object
properties:
Expand All @@ -596,17 +607,6 @@ definitions:
type: boolean
title: whether the chunk is retrievable
title: Create chunk response
ArtifactPublicServiceViewChunksBody:
type: object
properties:
textPrompt:
type: string
title: text prompt
topK:
type: integer
format: int64
title: top k
title: View chunks request
GetFileCatalogResponseChunkType:
type: string
enum:
Expand Down Expand Up @@ -1313,6 +1313,16 @@ definitions:
type: string
title: source file
title: similarity chunks
v1alphaSimilarityChunksSearchResponse:
type: object
properties:
similarChunks:
type: array
items:
type: object
$ref: '#/definitions/v1alphaSimilarityChunk'
title: chunks
title: Similar chunk search response
v1alphaSourceFile:
type: object
properties:
Expand Down Expand Up @@ -1355,16 +1365,6 @@ definitions:
allOf:
- $ref: '#/definitions/v1alphaFile'
title: upload file response
v1alphaViewChunksResponse:
type: object
properties:
similarChunks:
type: array
items:
type: object
$ref: '#/definitions/v1alphaSimilarityChunk'
title: chunks
title: View chunks response
securityDefinitions:
Bearer:
type: apiKey
Expand Down

0 comments on commit 329f572

Please sign in to comment.