Skip to content

Commit

Permalink
chore(model): revert task input/output refactor
Browse files Browse the repository at this point in the history
This reverts commit bedba50.
  • Loading branch information
heiruwu committed Aug 14, 2024
1 parent c3050b7 commit 02bbb83
Show file tree
Hide file tree
Showing 17 changed files with 1,747 additions and 335 deletions.
146 changes: 73 additions & 73 deletions artifact/artifact/v1alpha/file_catalog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,77 +20,77 @@ message GetFileCatalogRequest {
}

// GetFileCatalogResponse
message GetFileCatalogResponse{
// metadata
message Metadata {
// file uid
string file_uid = 1;
// file id
string file_id = 2;
// file type
FileType file_type = 3;
// file size in bytes
int64 file_size = 4;
// upload time
google.protobuf.Timestamp file_upload_time = 5;
// file process status
FileProcessStatus file_process_status = 6;
}
// text message
message Text{
// pipelines
repeated string pipeline_ids = 1;
// transformed content
string transformed_content = 2;
// transformed content uid
string transformed_content_uid = 3;
// transformed content chunk number
int32 transformed_content_chunk_num = 4;
// transformed content token number
int32 transformed_content_token_num = 5;
// transformed content update time
google.protobuf.Timestamp transformed_content_update_time = 6;
}
// chunk type
enum ChunkType {
// unspecified
CHUNK_TYPE_UNSPECIFIED = 0;
// text
CHUNK_TYPE_TEXT = 1;
// image
CHUNK_TYPE_IMAGE = 2;
// audio
CHUNK_TYPE_AUDIO = 3;
// video
CHUNK_TYPE_VIDEO = 4;
}
// 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 start_pos = 3;
// chunk end position
int32 end_pos =4;
// chunk content
string content = 5;
// chunk tokens num
int32 tokens_num = 6;
// embedding. float32 array
repeated float embedding = 7;
// chunk create time
google.protobuf.Timestamp create_time = 8;
// chunk retrievable
bool retrievable = 9;
}
// original data is encoded in base64
string original_data = 1;
// file catalog
Metadata metadata = 2;
// text
Text text = 3;
// chunks
repeated Chunk chunks = 4;
message GetFileCatalogResponse {
// metadata
message Metadata {
// file uid
string file_uid = 1;
// file id
string file_id = 2;
// file type
FileType file_type = 3;
// file size in bytes
int64 file_size = 4;
// upload time
google.protobuf.Timestamp file_upload_time = 5;
// file process status
FileProcessStatus file_process_status = 6;
}
// text message
message Text {
// pipelines
repeated string pipeline_ids = 1;
// transformed content
string transformed_content = 2;
// transformed content uid
string transformed_content_uid = 3;
// transformed content chunk number
int32 transformed_content_chunk_num = 4;
// transformed content token number
int32 transformed_content_token_num = 5;
// transformed content update time
google.protobuf.Timestamp transformed_content_update_time = 6;
}
// chunk type
enum ChunkType {
// unspecified
CHUNK_TYPE_UNSPECIFIED = 0;
// text
CHUNK_TYPE_TEXT = 1;
// image
CHUNK_TYPE_IMAGE = 2;
// audio
CHUNK_TYPE_AUDIO = 3;
// video
CHUNK_TYPE_VIDEO = 4;
}
// 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 start_pos = 3;
// chunk end position
int32 end_pos = 4;
// chunk content
string content = 5;
// chunk tokens num
int32 tokens_num = 6;
// embedding. float32 array
repeated float embedding = 7;
// chunk create time
google.protobuf.Timestamp create_time = 8;
// chunk retrievable
bool retrievable = 9;
}
// original data is encoded in base64
string original_data = 1;
// file catalog
Metadata metadata = 2;
// text
Text text = 3;
// chunks
repeated Chunk chunks = 4;
}
10 changes: 3 additions & 7 deletions common/task/v1alpha/task.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@ enum Task {
// Text to Image - generate images from input text prompts.
TASK_TEXT_TO_IMAGE = 7;
// Text Generation - generate texts from input text prompts.
reserved 8;
TASK_TEXT_GENERATION = 8;
// Conversational Text Generation - generate text as responses to a dialog input.
reserved 9;
TASK_TEXT_GENERATION_CHAT = 9;
// Visual Question Answering - generate text as a response to a visual prompt.
reserved 10;
TASK_VISUAL_QUESTION_ANSWERING = 10;
// Image to Image - generate an image from another image.
TASK_IMAGE_TO_IMAGE = 11;
// Text Embeddings - generate an embedding (a representation as coordinates) from a text input.
TASK_TEXT_EMBEDDINGS = 12;
// Speech Recognition - transcribe the words in an audio input.
TASK_SPEECH_RECOGNITION = 13;
// Conversational Text Generation - generate text as responses to a dialog input.
TASK_CHAT = 14;
// Completion Text Generation - generate text following the input prompt.
TASK_COMPLETION = 15;
}
Loading

0 comments on commit 02bbb83

Please sign in to comment.