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

chore(model): revert task input/output refactor #422

Merged
merged 2 commits into from
Aug 14, 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
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