-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
syntax = "proto3"; | ||
|
||
package artifact.artifact.v1alpha; | ||
// Artifact definitions | ||
import "artifact/artifact/v1alpha/artifact.proto"; | ||
|
||
// Protocol Buffers Well-Known Types | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
// GetFileCatalogRequest | ||
message GetFileCatalogRequest{ | ||
// id of the namespace | ||
string namespaceId = 1; | ||
// id of the catalog | ||
string catalogId = 2; | ||
// id of the file(i.e. file name) | ||
string fileId = 3; | ||
// Uid of the file | ||
string fileUid = 4; | ||
} | ||
|
||
// GetFileCatalogResponse | ||
message GetFileCatalogResponse{ | ||
// metadata | ||
message Metadata { | ||
// file uid | ||
string fileUid = 1; | ||
// file id | ||
string fileId = 2; | ||
// file type | ||
FileType fileType = 3; | ||
// file size in bytes | ||
int64 fileSize = 4; | ||
// upload time | ||
google.protobuf.Timestamp fileUploadTime = 5; | ||
FileProcessStatus fileProcessStatus = 6; | ||
} | ||
// text message | ||
message Text{ | ||
// pipelines | ||
repeated string pipelineIds = 1; | ||
// transformed content | ||
string transformedContent = 2; | ||
// transformed content uid | ||
string transformedContentUid = 3; | ||
// transformed content chunk number | ||
int32 transformedContentChunkNumber = 4; | ||
// transformed content token number | ||
int32 transformedContentTokenNumber = 5; | ||
// transformed content update time | ||
google.protobuf.Timestamp transformedContentUpdateTime = 6; | ||
} | ||
// chunk type | ||
enum ChunkType { | ||
// text | ||
CHUNK_TYPE_TEXT = 0; | ||
// image | ||
CHUNK_TYPE_IMAGE = 1; | ||
// audio | ||
CHUNK_TYPE_AUDIO = 2; | ||
// video | ||
CHUNK_TYPE_VIDEO = 3; | ||
} | ||
// chunk message | ||
message Chunk { | ||
// chunk uid | ||
string uid = 1; | ||
// chunk type. i.e. text, image, audio, and video | ||
ChunkType type = 2; | ||
// chunk start position | ||
int32 startPos = 3; | ||
// chunk end position | ||
int32 endPos =4; | ||
// chunk content | ||
string content = 5; | ||
// chunk tokens num | ||
int32 tokensNum = 6; | ||
// embedding. float32 array | ||
repeated float embedding = 7; | ||
// chunk create time | ||
google.protobuf.Timestamp createTime = 8; | ||
// chunk retrievable | ||
bool retrievable = 9; | ||
} | ||
// file catalog | ||
Metadata metadata = 1; | ||
// text | ||
Text text = 2; | ||
// chunks | ||
repeated Chunk chunks = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
|
||
package artifact.artifact.v1alpha; | ||
|
||
// Artifact definitions | ||
import "artifact/artifact/v1alpha/chunk.proto"; | ||
|
||
|
||
// QARequest represents a request for the Question Answering service | ||
message QARequest { | ||
// id of the namespace | ||
string namespaceId = 1; | ||
// id of the catalog | ||
string catalogId = 2; | ||
// question to be answered | ||
string question = 3; | ||
// topk default to 5 | ||
int32 topk = 4; | ||
} | ||
|
||
// QAResponse represents a response from the Question Answering service | ||
message QAResponse { | ||
// answer to the question | ||
string answer = 1; | ||
// chunks | ||
repeated SimilarityChunk similarChunks = 2; | ||
} | ||
|