Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(catalog): support xlsx type and rename the api #432

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions artifact/artifact/v1alpha/artifact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ enum FileType {
FILE_TYPE_PDF = 2;
//MARKDOWN
FILE_TYPE_MARKDOWN = 3;
// PNG
// PNG(not supported yet)
FILE_TYPE_PNG = 4;
// JPEG
// JPEG(not supported yet)
FILE_TYPE_JPEG = 5;
// JPG
// JPG(not supported yet)
FILE_TYPE_JPG = 6;
// HTML
FILE_TYPE_HTML = 7;
Expand All @@ -301,6 +301,10 @@ enum FileType {
FILE_TYPE_PPT = 10;
// PPTX
FILE_TYPE_PPTX = 11;
// XLS(not supported yet)
FILE_TYPE_XLS = 12;
// XLSX
FILE_TYPE_XLSX = 13;
}

// file
Expand Down
30 changes: 15 additions & 15 deletions artifact/artifact/v1alpha/artifact_public_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// process file
// Process catalog files
rpc ProcessCatalogFiles(ProcessCatalogFilesRequest) returns (ProcessCatalogFilesResponse) {
option (google.api.http) = {
post: "/v1alpha/catalogs/files/processAsync"
Expand All @@ -97,24 +97,24 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// list files
// List catalog files
rpc ListCatalogFiles(ListCatalogFilesRequest) returns (ListCatalogFilesResponse) {
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/files"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// List chunks
// List catalog chunks
rpc ListChunks(ListChunksRequest) returns (ListChunksResponse) {
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/chunks"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// Get source file
// Get catalog single-source-of-truth file
rpc GetSourceFile(GetSourceFileRequest) returns (GetSourceFileResponse) {
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/files/{file_uid}/source"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// Update chunk
// Update catalog chunk
rpc UpdateChunk(UpdateChunkRequest) returns (UpdateChunkResponse) {
option (google.api.http) = {
post: "/v1alpha/chunks/{chunk_uid}"
Expand All @@ -123,7 +123,7 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// Similarity chunks search
// Retrieve similar chunks
rpc SimilarityChunksSearch(SimilarityChunksSearchRequest) returns (SimilarityChunksSearchResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/chunks/retrieve"
Expand All @@ -132,7 +132,7 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// Question Answering
// Ask a question
rpc QuestionAnswering(QuestionAnsweringRequest) returns (QuestionAnsweringResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/ask"
Expand All @@ -147,54 +147,54 @@ service ArtifactPublicService {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}

// CreateConversation
// Create a Conversation
rpc CreateConversation(CreateConversationRequest) returns (CreateConversationResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// ListConversations
// List conversations
rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse) {
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// UpdateConversation
// Update a conversation
rpc UpdateConversation(UpdateConversationRequest) returns (UpdateConversationResponse) {
option (google.api.http) = {
put: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// DeleteConversation
// Delete a conversation
rpc DeleteConversation(DeleteConversationRequest) returns (DeleteConversationResponse) {
option (google.api.http) = {delete: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// CreateMessage
// Create a message
rpc CreateMessage(CreateMessageRequest) returns (CreateMessageResponse) {
option (google.api.http) = {
post: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}/messages"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// ListMessages
// List messages
rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) {
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}/messages"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// UpdateMessage
// Update a message
rpc UpdateMessage(UpdateMessageRequest) returns (UpdateMessageResponse) {
option (google.api.http) = {
put: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}/messages/{message_uid}"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
}
// DeleteMessage
// Delete a message
rpc DeleteMessage(DeleteMessageRequest) returns (DeleteMessageResponse) {
option (google.api.http) = {delete: "/v1alpha/namespaces/{namespace_id}/catalogs/{catalog_id}/conversations/{conversation_id}/messages/{message_uid}"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Catalog"};
Expand Down
40 changes: 22 additions & 18 deletions openapiv2/artifact/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/files:
get:
summary: list files
summary: List catalog files
operationId: ArtifactPublicService_ListCatalogFiles
responses:
"200":
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
- Catalog
/v1alpha/catalogs/files/processAsync:
post:
summary: process file
summary: Process catalog files
operationId: ArtifactPublicService_ProcessCatalogFiles
responses:
"200":
Expand All @@ -265,7 +265,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks:
get:
summary: List chunks
summary: List catalog chunks
operationId: ArtifactPublicService_ListChunks
responses:
"200":
Expand Down Expand Up @@ -299,7 +299,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/files/{fileUid}/source:
get:
summary: Get source file
summary: Get catalog single-source-of-truth file
operationId: ArtifactPublicService_GetSourceFile
responses:
"200":
Expand Down Expand Up @@ -333,7 +333,7 @@ paths:
- Catalog
/v1alpha/chunks/{chunkUid}:
post:
summary: Update chunk
summary: Update catalog chunk
operationId: ArtifactPublicService_UpdateChunk
responses:
"200":
Expand Down Expand Up @@ -362,7 +362,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks/retrieve:
post:
summary: Similarity chunks search
summary: Retrieve similar chunks
operationId: ArtifactPublicService_SimilarityChunksSearch
responses:
"200":
Expand Down Expand Up @@ -396,7 +396,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/ask:
post:
summary: Question Answering
summary: Ask a question
operationId: ArtifactPublicService_QuestionAnswering
responses:
"200":
Expand Down Expand Up @@ -469,7 +469,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/conversations:
get:
summary: ListConversations
summary: List conversations
operationId: ArtifactPublicService_ListConversations
responses:
"200":
Expand Down Expand Up @@ -508,7 +508,7 @@ paths:
tags:
- Catalog
post:
summary: CreateConversation
summary: Create a Conversation
operationId: ArtifactPublicService_CreateConversation
responses:
"200":
Expand Down Expand Up @@ -542,7 +542,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/conversations/{conversationId}:
delete:
summary: DeleteConversation
summary: Delete a conversation
operationId: ArtifactPublicService_DeleteConversation
responses:
"200":
Expand Down Expand Up @@ -575,7 +575,7 @@ paths:
tags:
- Catalog
put:
summary: UpdateConversation
summary: Update a conversation
operationId: ArtifactPublicService_UpdateConversation
responses:
"200":
Expand Down Expand Up @@ -614,7 +614,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/conversations/{conversationId}/messages:
get:
summary: ListMessages
summary: List messages
operationId: ArtifactPublicService_ListMessages
responses:
"200":
Expand Down Expand Up @@ -669,7 +669,7 @@ paths:
tags:
- Catalog
post:
summary: CreateMessage
summary: Create a message
operationId: ArtifactPublicService_CreateMessage
responses:
"200":
Expand Down Expand Up @@ -708,7 +708,7 @@ paths:
- Catalog
/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/conversations/{conversationId}/messages/{messageUid}:
delete:
summary: DeleteMessage
summary: Delete a message
operationId: ArtifactPublicService_DeleteMessage
responses:
"200":
Expand Down Expand Up @@ -746,7 +746,7 @@ paths:
tags:
- Catalog
put:
summary: UpdateMessage
summary: Update a message
operationId: ArtifactPublicService_UpdateMessage
responses:
"200":
Expand Down Expand Up @@ -1250,18 +1250,22 @@ definitions:
- FILE_TYPE_DOC
- FILE_TYPE_PPT
- FILE_TYPE_PPTX
- FILE_TYPE_XLS
- FILE_TYPE_XLSX
description: |-
- FILE_TYPE_TEXT: text
- FILE_TYPE_PDF: PDF
- FILE_TYPE_MARKDOWN: MARKDOWN
- FILE_TYPE_PNG: PNG
- FILE_TYPE_JPEG: JPEG
- FILE_TYPE_JPG: JPG
- FILE_TYPE_PNG: PNG(not supported yet)
- FILE_TYPE_JPEG: JPEG(not supported yet)
- FILE_TYPE_JPG: JPG(not supported yet)
- FILE_TYPE_HTML: HTML
- FILE_TYPE_DOCX: DOCX
- FILE_TYPE_DOC: DOC
- FILE_TYPE_PPT: PPT
- FILE_TYPE_PPTX: PPTX
- FILE_TYPE_XLS: XLS(not supported yet)
- FILE_TYPE_XLSX: XLSX
title: file type
v1alphaGetFileCatalogResponse:
type: object
Expand Down