diff --git a/artifact/artifact/v1alpha/artifact_public_service.proto b/artifact/artifact/v1alpha/artifact_public_service.proto index 82f48c24..f4ff7d0c 100644 --- a/artifact/artifact/v1alpha/artifact_public_service.proto +++ b/artifact/artifact/v1alpha/artifact_public_service.proto @@ -5,10 +5,9 @@ package artifact.artifact.v1alpha; // Artifact definitions import "artifact/artifact/v1alpha/artifact.proto"; import "artifact/artifact/v1alpha/chunk.proto"; +import "artifact/artifact/v1alpha/conversation.proto"; import "artifact/artifact/v1alpha/file_catalog.proto"; import "artifact/artifact/v1alpha/qa.proto"; -import "artifact/artifact/v1alpha/conversation.proto"; - // Google API import "google/api/annotations.proto"; import "google/api/visibility.proto"; @@ -200,5 +199,4 @@ service ArtifactPublicService { 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"}; } - } diff --git a/artifact/artifact/v1alpha/conversation.proto b/artifact/artifact/v1alpha/conversation.proto index b13bf44a..050ca2c8 100644 --- a/artifact/artifact/v1alpha/conversation.proto +++ b/artifact/artifact/v1alpha/conversation.proto @@ -2,206 +2,203 @@ syntax = "proto3"; package artifact.artifact.v1alpha; +import "google/api/field_behavior.proto"; // Protocol Buffers Well-Known Types import "google/protobuf/timestamp.proto"; -import "google/api/field_behavior.proto"; - - // Conversation represents a chat conversation message Conversation { - // unique identifier of the conversation created by the system - string uid = 1; - // namespace id - string namespace_id = 2; - // catalog id - string catalog_id = 3; - // conversation id/name - string id = 4; - // creation time of the conversation - google.protobuf.Timestamp create_time = 5; - // update time of the conversation - google.protobuf.Timestamp update_time = 6; + // unique identifier of the conversation created by the system + string uid = 1; + // namespace id + string namespace_id = 2; + // catalog id + string catalog_id = 3; + // conversation id/name + string id = 4; + // creation time of the conversation + google.protobuf.Timestamp create_time = 5; + // update time of the conversation + google.protobuf.Timestamp update_time = 6; } // Message represents a single message in a conversation message Message { - // message type - enum MessageType { - // unspecified - MESSAGE_TYPE_UNSPECIFIED = 0; - // text - MESSAGE_TYPE_TEXT = 1; - } - // message uid - string uid = 1; - // catalog uid - string catalog_uid = 2; - // conversation uid - string conversation_uid = 3; - // message content - string content = 4; - // message role e.g., "user" or "assistant" - string role = 5; - // message type - MessageType type = 6; - // creation time of the message - google.protobuf.Timestamp create_time = 7; - // update time of the message - google.protobuf.Timestamp update_time = 8; + // message type + enum MessageType { + // unspecified + MESSAGE_TYPE_UNSPECIFIED = 0; + // text + MESSAGE_TYPE_TEXT = 1; + } + // message uid + string uid = 1; + // catalog uid + string catalog_uid = 2; + // conversation uid + string conversation_uid = 3; + // message content + string content = 4; + // message role e.g., "user" or "assistant" + string role = 5; + // message type + MessageType type = 6; + // creation time of the message + google.protobuf.Timestamp create_time = 7; + // update time of the message + google.protobuf.Timestamp update_time = 8; } // CreateConversationRequest is used to create a new conversation message CreateConversationRequest { - // namespace id - string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; - // catalog id - string catalog_id = 2; - // conversation id. only allow kebab case - string conversation_id = 3 [(google.api.field_behavior) = REQUIRED]; + // namespace id + string namespace_id = 1 [(google.api.field_behavior) = REQUIRED]; + // catalog id + string catalog_id = 2; + // conversation id. only allow kebab case + string conversation_id = 3 [(google.api.field_behavior) = REQUIRED]; } // CreateConversationResponse returns the created conversation message CreateConversationResponse { - // conversation - Conversation conversation = 1; + // conversation + Conversation conversation = 1; } // ListConversationsRequest is used to list conversations message ListConversationsRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // page size - int32 page_size = 3; - // page token - string page_token = 4; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // page size + int32 page_size = 3; + // page token + string page_token = 4; } // ListConversationsResponse returns a list of conversations message ListConversationsResponse { - // conversations - repeated Conversation conversations = 1; - // next page token - string next_page_token = 2; - // total size - int32 total_size = 3; + // conversations + repeated Conversation conversations = 1; + // next page token + string next_page_token = 2; + // total size + int32 total_size = 3; } // UpdateConversationRequest is used to update a conversation message UpdateConversationRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; - // new conversation id - string new_conversation_id = 4; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; + // new conversation id + string new_conversation_id = 4; } // UpdateConversationResponse returns the updated conversation message UpdateConversationResponse { - // conversation - Conversation conversation = 1; + // conversation + Conversation conversation = 1; } // DeleteConversationRequest is used to delete a conversation message DeleteConversationRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; } // DeleteConversationResponse is empty as no content needs to be returned -message DeleteConversationResponse { -} +message DeleteConversationResponse {} // CreateMessageRequest is used to create a new message message CreateMessageRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; - // message content - string content = 4; - // message role - string role = 5; - // message type - Message.MessageType type = 6; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; + // message content + string content = 4; + // message role + string role = 5; + // message type + Message.MessageType type = 6; } // CreateMessageResponse returns the created message message CreateMessageResponse { - // message - Message message = 1; + // message + Message message = 1; } // ListMessagesRequest is used to list messages in a conversation message ListMessagesRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; - // latest k messages - int32 latest_k = 4; - // page size - int32 page_size = 5; - // page token - string page_token = 6; - // include system messages - bool include_system_messages = 7; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; + // latest k messages + int32 latest_k = 4; + // page size + int32 page_size = 5; + // page token + string page_token = 6; + // include system messages + bool include_system_messages = 7; } // ListMessagesResponse returns a list of messages message ListMessagesResponse { - // messages - repeated Message messages = 1; - // next page token - string next_page_token = 2; - // total size - int32 total_size = 3; + // messages + repeated Message messages = 1; + // next page token + string next_page_token = 2; + // total size + int32 total_size = 3; } // UpdateMessageRequest is used to update a message message UpdateMessageRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; - // message uid - string message_uid = 4; - // new message content - string content = 5; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; + // message uid + string message_uid = 4; + // new message content + string content = 5; } // UpdateMessageResponse returns the updated message message UpdateMessageResponse { - // message - Message message = 1; + // message + Message message = 1; } // DeleteMessageRequest is used to delete a message message DeleteMessageRequest { - // namespace id - string namespace_id = 1; - // catalog id - string catalog_id = 2; - // conversation id - string conversation_id = 3; - // message uid - string message_uid = 4; + // namespace id + string namespace_id = 1; + // catalog id + string catalog_id = 2; + // conversation id + string conversation_id = 3; + // message uid + string message_uid = 4; } // DeleteMessageResponse is empty as no content needs to be returned -message DeleteMessageResponse {} \ No newline at end of file +message DeleteMessageResponse {} diff --git a/model/model/v1alpha/model.proto b/model/model/v1alpha/model.proto index 617c33fc..ed3837f1 100644 --- a/model/model/v1alpha/model.proto +++ b/model/model/v1alpha/model.proto @@ -4,8 +4,8 @@ package model.model.v1alpha; // common definitions import "common/healthcheck/v1beta/healthcheck.proto"; -import "common/task/v1alpha/task.proto"; import "common/run/v1alpha/run.proto"; +import "common/task/v1alpha/task.proto"; // Core definitions import "core/mgmt/v1beta/mgmt.proto"; // Google API @@ -75,8 +75,8 @@ enum State { STATE_UNSPECIFIED = 0; // Offline is the state when the model instance number is 0. STATE_OFFLINE = 1; - // Scaling is the transition state when a model instance is scaling up or down. - STATE_SCALING = 2; + // Deprecate state. + reserved 2; // Active is the state when a model is processing requests. STATE_ACTIVE = 3; // Idle is the state when a model is alive but not processing requests. @@ -86,6 +86,10 @@ enum State { // Starting is the state when the system is provisioning the necessary // resources for the model STATE_STARTING = 6; + // Scaling Up is the transition state when the system is provisioning compute resource for this model instance. + STATE_SCALING_UP = 7; + // Scaling is the transition state when the system is releasing compute resource for this model instance. + STATE_SCALING_DOWN = 8; } // ModelVersion contains information about the version of a model. diff --git a/openapiv2/model/service.swagger.yaml b/openapiv2/model/service.swagger.yaml index a402c038..d52056b4 100644 --- a/openapiv2/model/service.swagger.yaml +++ b/openapiv2/model/service.swagger.yaml @@ -2830,23 +2830,25 @@ definitions: type: string enum: - STATE_OFFLINE - - STATE_SCALING - STATE_ACTIVE - STATE_IDLE - STATE_ERROR - STATE_STARTING + - STATE_SCALING_UP + - STATE_SCALING_DOWN description: |- State describes the state of a model. See [Deploy Models](https://www.instill.tech/docs/latest/model/deploy) for more information. - STATE_OFFLINE: Offline is the state when the model instance number is 0. - - STATE_SCALING: Scaling is the transition state when a model instance is scaling up or down. - STATE_ACTIVE: Active is the state when a model is processing requests. - STATE_IDLE: Idle is the state when a model is alive but not processing requests. - STATE_ERROR: Error is the state when the model is undeployable. - STATE_STARTING: Starting is the state when the system is provisioning the necessary resources for the model + - STATE_SCALING_UP: Scaling Up is the transition state when the system is provisioning compute resource for this model instance. + - STATE_SCALING_DOWN: Scaling is the transition state when the system is releasing compute resource for this model instance. modelv1alphaView: type: string enum: diff --git a/vdp/pipeline/v1beta/pipeline_public_service.proto b/vdp/pipeline/v1beta/pipeline_public_service.proto index cffa37d0..989d6fce 100644 --- a/vdp/pipeline/v1beta/pipeline_public_service.proto +++ b/vdp/pipeline/v1beta/pipeline_public_service.proto @@ -1496,9 +1496,7 @@ service PipelinePublicService { // regardless the requester. Other requesters will only be able to see the // runs requested by themselves. rpc ListPipelineRuns(ListPipelineRunsRequest) returns (ListPipelineRunsResponse) { - option (google.api.http) = { - get: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs" - }; + option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Trigger"}; } @@ -1506,9 +1504,7 @@ service PipelinePublicService { // // Returns the information of each component execution within a pipeline run. rpc ListComponentRuns(ListComponentRunsRequest) returns (ListComponentRunsResponse) { - option (google.api.http) = { - get: "/v1beta/pipeline-runs/{pipeline_run_id}/component-runs" - }; + option (google.api.http) = {get: "/v1beta/pipeline-runs/{pipeline_run_id}/component-runs"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Trigger"}; } }