diff --git a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go index 6b5233b..9a41572 100644 --- a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go +++ b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.go @@ -129,6 +129,55 @@ func (MessageError) EnumDescriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{1} } +type CompletionStatus int32 + +const ( + CompletionStatus_COMPLETED CompletionStatus = 0 + CompletionStatus_FAILED CompletionStatus = 1 + CompletionStatus_TIMEOUT CompletionStatus = 2 +) + +// Enum value maps for CompletionStatus. +var ( + CompletionStatus_name = map[int32]string{ + 0: "COMPLETED", + 1: "FAILED", + 2: "TIMEOUT", + } + CompletionStatus_value = map[string]int32{ + "COMPLETED": 0, + "FAILED": 1, + "TIMEOUT": 2, + } +) + +func (x CompletionStatus) Enum() *CompletionStatus { + p := new(CompletionStatus) + *p = x + return p +} + +func (x CompletionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CompletionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_chat_proto_enumTypes[2].Descriptor() +} + +func (CompletionStatus) Type() protoreflect.EnumType { + return &file_chat_proto_enumTypes[2] +} + +func (x CompletionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CompletionStatus.Descriptor instead. +func (CompletionStatus) EnumDescriptor() ([]byte, []int) { + return file_chat_proto_rawDescGZIP(), []int{2} +} + type ChatError int32 const ( @@ -180,11 +229,11 @@ func (x ChatError) String() string { } func (ChatError) Descriptor() protoreflect.EnumDescriptor { - return file_chat_proto_enumTypes[2].Descriptor() + return file_chat_proto_enumTypes[3].Descriptor() } func (ChatError) Type() protoreflect.EnumType { - return &file_chat_proto_enumTypes[2] + return &file_chat_proto_enumTypes[3] } func (x ChatError) Number() protoreflect.EnumNumber { @@ -193,7 +242,7 @@ func (x ChatError) Number() protoreflect.EnumNumber { // Deprecated: Use ChatError.Descriptor instead. func (ChatError) EnumDescriptor() ([]byte, []int) { - return file_chat_proto_rawDescGZIP(), []int{2} + return file_chat_proto_rawDescGZIP(), []int{3} } type MessageResponseError struct { @@ -1799,11 +1848,12 @@ type CompletionResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - InputTokens *int32 `protobuf:"varint,2,opt,name=input_tokens,json=inputTokens,proto3,oneof" json:"input_tokens,omitempty"` - OutputTokens *int32 `protobuf:"varint,3,opt,name=output_tokens,json=outputTokens,proto3,oneof" json:"output_tokens,omitempty"` - ImageResolution *string `protobuf:"bytes,4,opt,name=image_resolution,json=imageResolution,proto3,oneof" json:"image_resolution,omitempty"` - ImageSteps *int32 `protobuf:"varint,5,opt,name=image_steps,json=imageSteps,proto3,oneof" json:"image_steps,omitempty"` + Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + InputTokens *int32 `protobuf:"varint,2,opt,name=input_tokens,json=inputTokens,proto3,oneof" json:"input_tokens,omitempty"` + OutputTokens *int32 `protobuf:"varint,3,opt,name=output_tokens,json=outputTokens,proto3,oneof" json:"output_tokens,omitempty"` + ImageResolution *string `protobuf:"bytes,4,opt,name=image_resolution,json=imageResolution,proto3,oneof" json:"image_resolution,omitempty"` + ImageSteps *int32 `protobuf:"varint,5,opt,name=image_steps,json=imageSteps,proto3,oneof" json:"image_steps,omitempty"` + Status *CompletionStatus `protobuf:"varint,6,opt,name=status,proto3,enum=chat.CompletionStatus,oneof" json:"status,omitempty"` } func (x *CompletionResponse) Reset() { @@ -1873,6 +1923,13 @@ func (x *CompletionResponse) GetImageSteps() int32 { return 0 } +func (x *CompletionResponse) GetStatus() CompletionStatus { + if x != nil && x.Status != nil { + return *x.Status + } + return CompletionStatus_COMPLETED +} + type BasePayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2422,7 +2479,7 @@ var file_chat_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x63, 0x6f, 0x64, 0x65, 0x22, 0xef, 0x02, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, @@ -2436,12 +2493,16 @@ var file_chat_proto_rawDesc = []byte{ 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, - 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x65, 0x70, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x22, 0x76, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x50, 0x61, + 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x65, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x04, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x76, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x75, @@ -2490,50 +2551,54 @@ var file_chat_proto_rawDesc = []byte{ 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, - 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfd, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x41, 0x4c, - 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x54, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, - 0x04, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x44, 0x41, 0x50, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x4f, 0x45, - 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x05, 0x12, 0x1a, - 0x0a, 0x16, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x41, 0x49, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x4e, - 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, - 0x41, 0x54, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, - 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, - 0x58, 0x54, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, - 0x45, 0x44, 0x10, 0x08, 0x32, 0xfa, 0x02, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x68, 0x61, 0x74, - 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, - 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, - 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x12, 0x19, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, - 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, - 0x12, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x74, 0x61, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, - 0x68, 0x61, 0x74, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6a, 0x75, 0x70, 0x79, 0x74, 0x65, 0x72, 0x2d, 0x6e, 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, - 0x73, 0x2d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x44, 0x10, 0x04, 0x2a, 0x3a, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, + 0x2a, 0xfd, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x11, + 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, + 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, + 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x04, 0x12, 0x2b, 0x0a, + 0x27, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x41, 0x44, 0x41, 0x50, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x48, + 0x41, 0x54, 0x5f, 0x41, 0x49, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, + 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4f, + 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x10, 0x07, 0x12, 0x20, + 0x0a, 0x1c, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x4c, + 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, + 0x32, 0xfa, 0x02, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x41, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x63, 0x68, 0x61, + 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, + 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x63, 0x68, 0x61, + 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x04, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x43, 0x68, 0x61, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, + 0x68, 0x61, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x17, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x43, 0x68, 0x61, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, + 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2d, 0x5a, + 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x70, 0x79, + 0x74, 0x65, 0x72, 0x2d, 0x6e, 0x61, 0x61, 0x73, 0x2f, 0x6e, 0x61, 0x61, 0x73, 0x2d, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2548,91 +2613,93 @@ func file_chat_proto_rawDescGZIP() []byte { return file_chat_proto_rawDescData } -var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_chat_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_chat_proto_goTypes = []interface{}{ (MessageType)(0), // 0: chat.MessageType (MessageError)(0), // 1: chat.MessageError - (ChatError)(0), // 2: chat.ChatError - (*MessageResponseError)(nil), // 3: chat.MessageResponseError - (*Message)(nil), // 4: chat.Message - (*Messages)(nil), // 5: chat.Messages - (*MessageDeletionRequest)(nil), // 6: chat.MessageDeletionRequest - (*MessageDeletionResponse)(nil), // 7: chat.MessageDeletionResponse - (*MessageRatinResponseError)(nil), // 8: chat.MessageRatinResponseError - (*MessageRating)(nil), // 9: chat.MessageRating - (*MessageRatingCreationRequest)(nil), // 10: chat.MessageRatingCreationRequest - (*MessageRatingCreationResponse)(nil), // 11: chat.MessageRatingCreationResponse - (*Chat)(nil), // 12: chat.Chat - (*ChatMessages)(nil), // 13: chat.ChatMessages - (*ChatResponseError)(nil), // 14: chat.ChatResponseError - (*ChatCreationRequest)(nil), // 15: chat.ChatCreationRequest - (*ChatCreationResponse)(nil), // 16: chat.ChatCreationResponse - (*ChatGetRequest)(nil), // 17: chat.ChatGetRequest - (*ChatGetResponse)(nil), // 18: chat.ChatGetResponse - (*ChatMessageGetRequest)(nil), // 19: chat.ChatMessageGetRequest - (*ChatMessageGetResponse)(nil), // 20: chat.ChatMessageGetResponse - (*ChatDeletionRequest)(nil), // 21: chat.ChatDeletionRequest - (*ChatDeletionResponse)(nil), // 22: chat.ChatDeletionResponse - (*ChatUpdateRequest)(nil), // 23: chat.ChatUpdateRequest - (*ChatUpdateResponse)(nil), // 24: chat.ChatUpdateResponse - (*ChatListRequest)(nil), // 25: chat.ChatListRequest - (*ChatListResponse)(nil), // 26: chat.ChatListResponse - (*ChatStarRequest)(nil), // 27: chat.ChatStarRequest - (*ChatStarResponse)(nil), // 28: chat.ChatStarResponse - (*CompletionResponse)(nil), // 29: chat.CompletionResponse - (*BasePayload)(nil), // 30: chat.BasePayload - (*ChatCompletionRequest)(nil), // 31: chat.ChatCompletionRequest - (*ChatStopCompletionRequest)(nil), // 32: chat.ChatStopCompletionRequest - (*ChatStopCompletionResponse)(nil), // 33: chat.ChatStopCompletionResponse - (*ChatCompletionResponse)(nil), // 34: chat.ChatCompletionResponse - nil, // 35: chat.ChatMessages.MessagesEntry + (CompletionStatus)(0), // 2: chat.CompletionStatus + (ChatError)(0), // 3: chat.ChatError + (*MessageResponseError)(nil), // 4: chat.MessageResponseError + (*Message)(nil), // 5: chat.Message + (*Messages)(nil), // 6: chat.Messages + (*MessageDeletionRequest)(nil), // 7: chat.MessageDeletionRequest + (*MessageDeletionResponse)(nil), // 8: chat.MessageDeletionResponse + (*MessageRatinResponseError)(nil), // 9: chat.MessageRatinResponseError + (*MessageRating)(nil), // 10: chat.MessageRating + (*MessageRatingCreationRequest)(nil), // 11: chat.MessageRatingCreationRequest + (*MessageRatingCreationResponse)(nil), // 12: chat.MessageRatingCreationResponse + (*Chat)(nil), // 13: chat.Chat + (*ChatMessages)(nil), // 14: chat.ChatMessages + (*ChatResponseError)(nil), // 15: chat.ChatResponseError + (*ChatCreationRequest)(nil), // 16: chat.ChatCreationRequest + (*ChatCreationResponse)(nil), // 17: chat.ChatCreationResponse + (*ChatGetRequest)(nil), // 18: chat.ChatGetRequest + (*ChatGetResponse)(nil), // 19: chat.ChatGetResponse + (*ChatMessageGetRequest)(nil), // 20: chat.ChatMessageGetRequest + (*ChatMessageGetResponse)(nil), // 21: chat.ChatMessageGetResponse + (*ChatDeletionRequest)(nil), // 22: chat.ChatDeletionRequest + (*ChatDeletionResponse)(nil), // 23: chat.ChatDeletionResponse + (*ChatUpdateRequest)(nil), // 24: chat.ChatUpdateRequest + (*ChatUpdateResponse)(nil), // 25: chat.ChatUpdateResponse + (*ChatListRequest)(nil), // 26: chat.ChatListRequest + (*ChatListResponse)(nil), // 27: chat.ChatListResponse + (*ChatStarRequest)(nil), // 28: chat.ChatStarRequest + (*ChatStarResponse)(nil), // 29: chat.ChatStarResponse + (*CompletionResponse)(nil), // 30: chat.CompletionResponse + (*BasePayload)(nil), // 31: chat.BasePayload + (*ChatCompletionRequest)(nil), // 32: chat.ChatCompletionRequest + (*ChatStopCompletionRequest)(nil), // 33: chat.ChatStopCompletionRequest + (*ChatStopCompletionResponse)(nil), // 34: chat.ChatStopCompletionResponse + (*ChatCompletionResponse)(nil), // 35: chat.ChatCompletionResponse + nil, // 36: chat.ChatMessages.MessagesEntry } var file_chat_proto_depIdxs = []int32{ 1, // 0: chat.MessageResponseError.code:type_name -> chat.MessageError 0, // 1: chat.Message.type:type_name -> chat.MessageType - 4, // 2: chat.Messages.messages:type_name -> chat.Message + 5, // 2: chat.Messages.messages:type_name -> chat.Message 1, // 3: chat.MessageDeletionResponse.error:type_name -> chat.MessageError 1, // 4: chat.MessageRatinResponseError.code:type_name -> chat.MessageError - 8, // 5: chat.MessageRatingCreationResponse.error:type_name -> chat.MessageRatinResponseError - 9, // 6: chat.MessageRatingCreationResponse.message_rating:type_name -> chat.MessageRating - 35, // 7: chat.ChatMessages.messages:type_name -> chat.ChatMessages.MessagesEntry - 2, // 8: chat.ChatResponseError.code:type_name -> chat.ChatError - 12, // 9: chat.ChatCreationResponse.chat:type_name -> chat.Chat - 14, // 10: chat.ChatCreationResponse.error:type_name -> chat.ChatResponseError - 12, // 11: chat.ChatGetResponse.chat:type_name -> chat.Chat - 14, // 12: chat.ChatGetResponse.error:type_name -> chat.ChatResponseError - 14, // 13: chat.ChatMessageGetResponse.error:type_name -> chat.ChatResponseError - 13, // 14: chat.ChatMessageGetResponse.messages:type_name -> chat.ChatMessages - 14, // 15: chat.ChatDeletionResponse.error:type_name -> chat.ChatResponseError - 12, // 16: chat.ChatUpdateResponse.chat:type_name -> chat.Chat - 14, // 17: chat.ChatUpdateResponse.error:type_name -> chat.ChatResponseError - 12, // 18: chat.ChatListResponse.chat:type_name -> chat.Chat - 14, // 19: chat.ChatListResponse.error:type_name -> chat.ChatResponseError - 12, // 20: chat.ChatStarResponse.chat:type_name -> chat.Chat - 2, // 21: chat.ChatStarResponse.code:type_name -> chat.ChatError - 4, // 22: chat.CompletionResponse.messages:type_name -> chat.Message - 14, // 23: chat.ChatStopCompletionResponse.error:type_name -> chat.ChatResponseError - 29, // 24: chat.ChatCompletionResponse.completion:type_name -> chat.CompletionResponse - 14, // 25: chat.ChatCompletionResponse.error:type_name -> chat.ChatResponseError - 5, // 26: chat.ChatMessages.MessagesEntry.value:type_name -> chat.Messages - 15, // 27: chat.ChatService.Create:input_type -> chat.ChatCreationRequest - 17, // 28: chat.ChatService.Get:input_type -> chat.ChatGetRequest - 25, // 29: chat.ChatService.List:input_type -> chat.ChatListRequest - 21, // 30: chat.ChatService.Delete:input_type -> chat.ChatDeletionRequest - 23, // 31: chat.ChatService.Update:input_type -> chat.ChatUpdateRequest - 27, // 32: chat.ChatService.Star:input_type -> chat.ChatStarRequest - 16, // 33: chat.ChatService.Create:output_type -> chat.ChatCreationResponse - 18, // 34: chat.ChatService.Get:output_type -> chat.ChatGetResponse - 26, // 35: chat.ChatService.List:output_type -> chat.ChatListResponse - 22, // 36: chat.ChatService.Delete:output_type -> chat.ChatDeletionResponse - 24, // 37: chat.ChatService.Update:output_type -> chat.ChatUpdateResponse - 28, // 38: chat.ChatService.Star:output_type -> chat.ChatStarResponse - 33, // [33:39] is the sub-list for method output_type - 27, // [27:33] is the sub-list for method input_type - 27, // [27:27] is the sub-list for extension type_name - 27, // [27:27] is the sub-list for extension extendee - 0, // [0:27] is the sub-list for field type_name + 9, // 5: chat.MessageRatingCreationResponse.error:type_name -> chat.MessageRatinResponseError + 10, // 6: chat.MessageRatingCreationResponse.message_rating:type_name -> chat.MessageRating + 36, // 7: chat.ChatMessages.messages:type_name -> chat.ChatMessages.MessagesEntry + 3, // 8: chat.ChatResponseError.code:type_name -> chat.ChatError + 13, // 9: chat.ChatCreationResponse.chat:type_name -> chat.Chat + 15, // 10: chat.ChatCreationResponse.error:type_name -> chat.ChatResponseError + 13, // 11: chat.ChatGetResponse.chat:type_name -> chat.Chat + 15, // 12: chat.ChatGetResponse.error:type_name -> chat.ChatResponseError + 15, // 13: chat.ChatMessageGetResponse.error:type_name -> chat.ChatResponseError + 14, // 14: chat.ChatMessageGetResponse.messages:type_name -> chat.ChatMessages + 15, // 15: chat.ChatDeletionResponse.error:type_name -> chat.ChatResponseError + 13, // 16: chat.ChatUpdateResponse.chat:type_name -> chat.Chat + 15, // 17: chat.ChatUpdateResponse.error:type_name -> chat.ChatResponseError + 13, // 18: chat.ChatListResponse.chat:type_name -> chat.Chat + 15, // 19: chat.ChatListResponse.error:type_name -> chat.ChatResponseError + 13, // 20: chat.ChatStarResponse.chat:type_name -> chat.Chat + 3, // 21: chat.ChatStarResponse.code:type_name -> chat.ChatError + 5, // 22: chat.CompletionResponse.messages:type_name -> chat.Message + 2, // 23: chat.CompletionResponse.status:type_name -> chat.CompletionStatus + 15, // 24: chat.ChatStopCompletionResponse.error:type_name -> chat.ChatResponseError + 30, // 25: chat.ChatCompletionResponse.completion:type_name -> chat.CompletionResponse + 15, // 26: chat.ChatCompletionResponse.error:type_name -> chat.ChatResponseError + 6, // 27: chat.ChatMessages.MessagesEntry.value:type_name -> chat.Messages + 16, // 28: chat.ChatService.Create:input_type -> chat.ChatCreationRequest + 18, // 29: chat.ChatService.Get:input_type -> chat.ChatGetRequest + 26, // 30: chat.ChatService.List:input_type -> chat.ChatListRequest + 22, // 31: chat.ChatService.Delete:input_type -> chat.ChatDeletionRequest + 24, // 32: chat.ChatService.Update:input_type -> chat.ChatUpdateRequest + 28, // 33: chat.ChatService.Star:input_type -> chat.ChatStarRequest + 17, // 34: chat.ChatService.Create:output_type -> chat.ChatCreationResponse + 19, // 35: chat.ChatService.Get:output_type -> chat.ChatGetResponse + 27, // 36: chat.ChatService.List:output_type -> chat.ChatListResponse + 23, // 37: chat.ChatService.Delete:output_type -> chat.ChatDeletionResponse + 25, // 38: chat.ChatService.Update:output_type -> chat.ChatUpdateResponse + 29, // 39: chat.ChatService.Star:output_type -> chat.ChatStarResponse + 34, // [34:40] is the sub-list for method output_type + 28, // [28:34] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_chat_proto_init() } @@ -3061,7 +3128,7 @@ func file_chat_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chat_proto_rawDesc, - NumEnums: 3, + NumEnums: 4, NumMessages: 33, NumExtensions: 0, NumServices: 1, diff --git a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.validate.go b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.validate.go index ee6b3ba..d06b2a0 100644 --- a/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.validate.go +++ b/go/github.com/jupyter-naas/naas-models/go/chat/chat.pb.validate.go @@ -3550,6 +3550,10 @@ func (m *CompletionResponse) validate(all bool) error { // no validation rules for ImageSteps } + if m.Status != nil { + // no validation rules for Status + } + if len(errors) > 0 { return CompletionResponseMultiError(errors) } diff --git a/protos/chat.proto b/protos/chat.proto index c48d059..fc56475 100644 --- a/protos/chat.proto +++ b/protos/chat.proto @@ -24,6 +24,12 @@ enum MessageError { MESSAGE_NOT_AUTHORIZED = 4; } +enum CompletionStatus { + COMPLETED = 0; + FAILED = 1; + TIMEOUT = 2; +} + message MessageResponseError { optional MessageError code = 1; optional string status = 2; @@ -223,6 +229,7 @@ message CompletionResponse { optional int32 output_tokens = 3; optional string image_resolution = 4; optional int32 image_steps = 5; + optional CompletionStatus status = 6; } message BasePayload { diff --git a/python/naas_models/chat_pb2.py b/python/naas_models/chat_pb2.py index 78c085a..237af99 100644 --- a/python/naas_models/chat_pb2.py +++ b/python/naas_models/chat_pb2.py @@ -17,12 +17,14 @@ import naas_models.validate_pb2 as validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nchat.proto\x12\x04\x63hat\x1a\x1cgoogle/protobuf/struct.proto\x1a\x0evalidate.proto\"\xa8\x01\n\x14MessageResponseError\x12%\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"\xd4\x04\n\x07Message\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12!\n\ncreated_at\x18\x03 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x02\x88\x01\x01\x12\x14\n\x07\x63hat_id\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x16\n\tfrom_user\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x07message\x18\x06 \x01(\tH\x05\x88\x01\x01\x12#\n\x0cmessage_type\x18\x07 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x06\x88\x01\x01\x12\'\n\x10message_language\x18\x08 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x07\x88\x01\x01\x12\x15\n\x08model_id\x18\t \x01(\tH\x08\x88\x01\x01\x12$\n\x04type\x18\n \x01(\x0e\x32\x11.chat.MessageTypeH\t\x88\x01\x01\x12\x15\n\x08metadata\x18\x0b \x01(\tH\n\x88\x01\x01\x12!\n\ndeleted_at\x18\x0c \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x0b\x88\x01\x01\x12\x15\n\x08selected\x18\r \x01(\x08H\x0c\x88\x01\x01\x12\"\n\x0b\x61rchived_at\x18\x0e \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\r\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_versionB\r\n\x0b_created_atB\n\n\x08_chat_idB\x0c\n\n_from_userB\n\n\x08_messageB\x0f\n\r_message_typeB\x13\n\x11_message_languageB\x0b\n\t_model_idB\x07\n\x05_typeB\x0b\n\t_metadataB\r\n\x0b_deleted_atB\x0b\n\t_selectedB\x0e\n\x0c_archived_at\"+\n\x08Messages\x12\x1f\n\x08messages\x18\x01 \x03(\x0b\x32\r.chat.Message\"R\n\x16MessageDeletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_version\"K\n\x17MessageDeletionResponse\x12&\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xad\x01\n\x19MessageRatinResponseError\x12%\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"\xef\x01\n\rMessageRating\x12\x17\n\nmessage_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fmessage_version\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x17\n\ncreated_at\x18\x04 \x01(\tH\x03\x88\x01\x01\x12/\n\x06rating\x18\x05 \x01(\tB\x1a\xfa\x42\x17r\x15\x32\x10^(LIKE|DISLIKE)$\xd0\x01\x00H\x04\x88\x01\x01\x42\r\n\x0b_message_idB\n\n\x08_user_idB\x12\n\x10_message_versionB\r\n\x0b_created_atB\t\n\x07_rating\"\xb4\x01\n\x1cMessageRatingCreationRequest\x12\x17\n\nmessage_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0fmessage_version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12/\n\x06rating\x18\x03 \x01(\tB\x1a\xfa\x42\x17r\x15\x32\x10^(LIKE|DISLIKE)$\xd0\x01\x00H\x02\x88\x01\x01\x42\r\n\x0b_message_idB\x12\n\x10_message_versionB\t\n\x07_rating\"\xa3\x01\n\x1dMessageRatingCreationResponse\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1f.chat.MessageRatinResponseErrorH\x00\x88\x01\x01\x12\x30\n\x0emessage_rating\x18\x02 \x01(\x0b\x32\x13.chat.MessageRatingH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x11\n\x0f_message_rating\"\xb8\x02\n\x04\x43hat\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x17\n\ncreated_at\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x17\n\ndeleted_at\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08is_group\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16is_personnal_assistant\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\nstarred_at\x18\x08 \x01(\tH\x07\x88\x01\x01\x42\x05\n\x03_idB\r\n\x0b_created_atB\n\n\x08_user_idB\x07\n\x05_nameB\r\n\x0b_deleted_atB\x0b\n\t_is_groupB\x19\n\x17_is_personnal_assistantB\r\n\x0b_starred_at\"\x83\x01\n\x0c\x43hatMessages\x12\x32\n\x08messages\x18\x01 \x03(\x0b\x32 .chat.ChatMessages.MessagesEntry\x1a?\n\rMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.chat.Messages:\x02\x38\x01\"\xa2\x01\n\x11\x43hatResponseError\x12\"\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x0f.chat.ChatErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"q\n\x13\x43hatCreationRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x16is_personnal_assistant\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\x19\n\x17_is_personnal_assistant\"u\n\x14\x43hatCreationResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"(\n\x0e\x43hatGetRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"p\n\x0f\x43hatGetResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"/\n\x15\x43hatMessageGetRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"\x87\x01\n\x16\x43hatMessageGetResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x12)\n\x08messages\x18\x02 \x01(\x0b\x32\x12.chat.ChatMessagesH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x0b\n\t_messages\"-\n\x13\x43hatDeletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x05\n\x03_id\"M\n\x14\x43hatDeletionResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"G\n\x11\x43hatUpdateRequest\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_name\"s\n\x12\x43hatUpdateResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"a\n\x0f\x43hatListRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x0bpage_number\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0c\n\n_page_sizeB\x0e\n\x0c_page_number\"c\n\x10\x43hatListResponse\x12\x18\n\x04\x63hat\x18\x01 \x03(\x0b\x32\n.chat.Chat\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"E\n\x0f\x43hatStarRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04star\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_star\"g\n\x10\x43hatStarResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12\"\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x0f.chat.ChatErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x07\n\x05_code\"\xed\x01\n\x12\x43ompletionResponse\x12\x1f\n\x08messages\x18\x01 \x03(\x0b\x32\r.chat.Message\x12\x19\n\x0cinput_tokens\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1d\n\x10image_resolution\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0bimage_steps\x18\x05 \x01(\x05H\x03\x88\x01\x01\x42\x0f\n\r_input_tokensB\x10\n\x0e_output_tokensB\x13\n\x11_image_resolutionB\x0e\n\x0c_image_steps\"c\n\x0b\x42\x61sePayload\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03url\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prompt\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x06\n\x04_urlB\t\n\x07_prompt\"u\n\x15\x43hatCompletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08model_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07payload\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x05\n\x03_idB\x0b\n\t_model_idB\n\n\x08_payload\"3\n\x19\x43hatStopCompletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"S\n\x1a\x43hatStopCompletionResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\x91\x01\n\x16\x43hatCompletionResponse\x12\x31\n\ncompletion\x18\x01 \x01(\x0b\x32\x18.chat.CompletionResponseH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\r\n\x0b_completionB\x08\n\x06_error*;\n\x0bMessageType\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06SYSTEM\x10\x01\x12\x06\n\x02\x41I\x10\x02\x12\t\n\x05HUMAN\x10\x03*\x8c\x01\n\x0cMessageError\x12\x14\n\x10MESSAGE_NO_ERROR\x10\x00\x12\x1a\n\x16MESSAGE_ALREADY_EXISTS\x10\x01\x12\x15\n\x11MESSAGE_NOT_FOUND\x10\x02\x12\x17\n\x13MESSAGE_NOT_UPDATED\x10\x03\x12\x1a\n\x16MESSAGE_NOT_AUTHORIZED\x10\x04*\xfd\x01\n\tChatError\x12\x11\n\rCHAT_NO_ERROR\x10\x00\x12\x17\n\x13\x43HAT_ALREADY_EXISTS\x10\x01\x12\x12\n\x0e\x43HAT_NOT_FOUND\x10\x02\x12\x14\n\x10\x43HAT_NOT_UPDATED\x10\x03\x12\x17\n\x13\x43HAT_NOT_AUTHORIZED\x10\x04\x12+\n\'CHAT_COMPLETION_ADAPTOR_DOES_NOT_EXISTS\x10\x05\x12\x1a\n\x16\x43HAT_AIMODEL_NOT_FOUND\x10\x06\x12\x16\n\x12\x43HAT_OUT_OF_CREDIT\x10\x07\x12 \n\x1c\x43HAT_CONTEXT_LENGTH_EXCEEDED\x10\x08\x32\xfa\x02\n\x0b\x43hatService\x12\x41\n\x06\x43reate\x12\x19.chat.ChatCreationRequest\x1a\x1a.chat.ChatCreationResponse\"\x00\x12\x34\n\x03Get\x12\x14.chat.ChatGetRequest\x1a\x15.chat.ChatGetResponse\"\x00\x12\x37\n\x04List\x12\x15.chat.ChatListRequest\x1a\x16.chat.ChatListResponse\"\x00\x12\x41\n\x06\x44\x65lete\x12\x19.chat.ChatDeletionRequest\x1a\x1a.chat.ChatDeletionResponse\"\x00\x12=\n\x06Update\x12\x17.chat.ChatUpdateRequest\x1a\x18.chat.ChatUpdateResponse\"\x00\x12\x37\n\x04Star\x12\x15.chat.ChatStarRequest\x1a\x16.chat.ChatStarResponse\"\x00\x42-Z+github.com/jupyter-naas/naas-models/go/chatb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nchat.proto\x12\x04\x63hat\x1a\x1cgoogle/protobuf/struct.proto\x1a\x0evalidate.proto\"\xa8\x01\n\x14MessageResponseError\x12%\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"\xd4\x04\n\x07Message\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12!\n\ncreated_at\x18\x03 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x02\x88\x01\x01\x12\x14\n\x07\x63hat_id\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x16\n\tfrom_user\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x14\n\x07message\x18\x06 \x01(\tH\x05\x88\x01\x01\x12#\n\x0cmessage_type\x18\x07 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x06\x88\x01\x01\x12\'\n\x10message_language\x18\x08 \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x07\x88\x01\x01\x12\x15\n\x08model_id\x18\t \x01(\tH\x08\x88\x01\x01\x12$\n\x04type\x18\n \x01(\x0e\x32\x11.chat.MessageTypeH\t\x88\x01\x01\x12\x15\n\x08metadata\x18\x0b \x01(\tH\n\x88\x01\x01\x12!\n\ndeleted_at\x18\x0c \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\x0b\x88\x01\x01\x12\x15\n\x08selected\x18\r \x01(\x08H\x0c\x88\x01\x01\x12\"\n\x0b\x61rchived_at\x18\x0e \x01(\tB\x08\xfa\x42\x05r\x03\xd0\x01\x01H\r\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_versionB\r\n\x0b_created_atB\n\n\x08_chat_idB\x0c\n\n_from_userB\n\n\x08_messageB\x0f\n\r_message_typeB\x13\n\x11_message_languageB\x0b\n\t_model_idB\x07\n\x05_typeB\x0b\n\t_metadataB\r\n\x0b_deleted_atB\x0b\n\t_selectedB\x0e\n\x0c_archived_at\"+\n\x08Messages\x12\x1f\n\x08messages\x18\x01 \x03(\x0b\x32\r.chat.Message\"R\n\x16MessageDeletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_version\"K\n\x17MessageDeletionResponse\x12&\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xad\x01\n\x19MessageRatinResponseError\x12%\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x12.chat.MessageErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"\xef\x01\n\rMessageRating\x12\x17\n\nmessage_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fmessage_version\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x17\n\ncreated_at\x18\x04 \x01(\tH\x03\x88\x01\x01\x12/\n\x06rating\x18\x05 \x01(\tB\x1a\xfa\x42\x17r\x15\x32\x10^(LIKE|DISLIKE)$\xd0\x01\x00H\x04\x88\x01\x01\x42\r\n\x0b_message_idB\n\n\x08_user_idB\x12\n\x10_message_versionB\r\n\x0b_created_atB\t\n\x07_rating\"\xb4\x01\n\x1cMessageRatingCreationRequest\x12\x17\n\nmessage_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0fmessage_version\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12/\n\x06rating\x18\x03 \x01(\tB\x1a\xfa\x42\x17r\x15\x32\x10^(LIKE|DISLIKE)$\xd0\x01\x00H\x02\x88\x01\x01\x42\r\n\x0b_message_idB\x12\n\x10_message_versionB\t\n\x07_rating\"\xa3\x01\n\x1dMessageRatingCreationResponse\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1f.chat.MessageRatinResponseErrorH\x00\x88\x01\x01\x12\x30\n\x0emessage_rating\x18\x02 \x01(\x0b\x32\x13.chat.MessageRatingH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x11\n\x0f_message_rating\"\xb8\x02\n\x04\x43hat\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x17\n\ncreated_at\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x17\n\ndeleted_at\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08is_group\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12#\n\x16is_personnal_assistant\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\nstarred_at\x18\x08 \x01(\tH\x07\x88\x01\x01\x42\x05\n\x03_idB\r\n\x0b_created_atB\n\n\x08_user_idB\x07\n\x05_nameB\r\n\x0b_deleted_atB\x0b\n\t_is_groupB\x19\n\x17_is_personnal_assistantB\r\n\x0b_starred_at\"\x83\x01\n\x0c\x43hatMessages\x12\x32\n\x08messages\x18\x01 \x03(\x0b\x32 .chat.ChatMessages.MessagesEntry\x1a?\n\rMessagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.chat.Messages:\x02\x38\x01\"\xa2\x01\n\x11\x43hatResponseError\x12\"\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x0f.chat.ChatErrorH\x00\x88\x01\x01\x12\x13\n\x06status\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06reason\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07message\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_codeB\t\n\x07_statusB\t\n\x07_reasonB\n\n\x08_message\"q\n\x13\x43hatCreationRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12#\n\x16is_personnal_assistant\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\x19\n\x17_is_personnal_assistant\"u\n\x14\x43hatCreationResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"(\n\x0e\x43hatGetRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"p\n\x0f\x43hatGetResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"/\n\x15\x43hatMessageGetRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"\x87\x01\n\x16\x43hatMessageGetResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x12)\n\x08messages\x18\x02 \x01(\x0b\x32\x12.chat.ChatMessagesH\x01\x88\x01\x01\x42\x08\n\x06_errorB\x0b\n\t_messages\"-\n\x13\x43hatDeletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x05\n\x03_id\"M\n\x14\x43hatDeletionResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"G\n\x11\x43hatUpdateRequest\x12\x0f\n\x02id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_name\"s\n\x12\x43hatUpdateResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x08\n\x06_error\"a\n\x0f\x43hatListRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x18\n\x0bpage_number\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0c\n\n_page_sizeB\x0e\n\x0c_page_number\"c\n\x10\x43hatListResponse\x12\x18\n\x04\x63hat\x18\x01 \x03(\x0b\x32\n.chat.Chat\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"E\n\x0f\x43hatStarRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04star\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x05\n\x03_idB\x07\n\x05_star\"g\n\x10\x43hatStarResponse\x12\x1d\n\x04\x63hat\x18\x01 \x01(\x0b\x32\n.chat.ChatH\x00\x88\x01\x01\x12\"\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x0f.chat.ChatErrorH\x01\x88\x01\x01\x42\x07\n\x05_chatB\x07\n\x05_code\"\xa5\x02\n\x12\x43ompletionResponse\x12\x1f\n\x08messages\x18\x01 \x03(\x0b\x32\r.chat.Message\x12\x19\n\x0cinput_tokens\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1d\n\x10image_resolution\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0bimage_steps\x18\x05 \x01(\x05H\x03\x88\x01\x01\x12+\n\x06status\x18\x06 \x01(\x0e\x32\x16.chat.CompletionStatusH\x04\x88\x01\x01\x42\x0f\n\r_input_tokensB\x10\n\x0e_output_tokensB\x13\n\x11_image_resolutionB\x0e\n\x0c_image_stepsB\t\n\x07_status\"c\n\x0b\x42\x61sePayload\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03url\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prompt\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x06\n\x04_urlB\t\n\x07_prompt\"u\n\x15\x43hatCompletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08model_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07payload\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x05\n\x03_idB\x0b\n\t_model_idB\n\n\x08_payload\"3\n\x19\x43hatStopCompletionRequest\x12\x0f\n\x02id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\x05\n\x03_id\"S\n\x1a\x43hatStopCompletionResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x00\x88\x01\x01\x42\x08\n\x06_error\"\x91\x01\n\x16\x43hatCompletionResponse\x12\x31\n\ncompletion\x18\x01 \x01(\x0b\x32\x18.chat.CompletionResponseH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x17.chat.ChatResponseErrorH\x01\x88\x01\x01\x42\r\n\x0b_completionB\x08\n\x06_error*;\n\x0bMessageType\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06SYSTEM\x10\x01\x12\x06\n\x02\x41I\x10\x02\x12\t\n\x05HUMAN\x10\x03*\x8c\x01\n\x0cMessageError\x12\x14\n\x10MESSAGE_NO_ERROR\x10\x00\x12\x1a\n\x16MESSAGE_ALREADY_EXISTS\x10\x01\x12\x15\n\x11MESSAGE_NOT_FOUND\x10\x02\x12\x17\n\x13MESSAGE_NOT_UPDATED\x10\x03\x12\x1a\n\x16MESSAGE_NOT_AUTHORIZED\x10\x04*:\n\x10\x43ompletionStatus\x12\r\n\tCOMPLETED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\x0b\n\x07TIMEOUT\x10\x02*\xfd\x01\n\tChatError\x12\x11\n\rCHAT_NO_ERROR\x10\x00\x12\x17\n\x13\x43HAT_ALREADY_EXISTS\x10\x01\x12\x12\n\x0e\x43HAT_NOT_FOUND\x10\x02\x12\x14\n\x10\x43HAT_NOT_UPDATED\x10\x03\x12\x17\n\x13\x43HAT_NOT_AUTHORIZED\x10\x04\x12+\n\'CHAT_COMPLETION_ADAPTOR_DOES_NOT_EXISTS\x10\x05\x12\x1a\n\x16\x43HAT_AIMODEL_NOT_FOUND\x10\x06\x12\x16\n\x12\x43HAT_OUT_OF_CREDIT\x10\x07\x12 \n\x1c\x43HAT_CONTEXT_LENGTH_EXCEEDED\x10\x08\x32\xfa\x02\n\x0b\x43hatService\x12\x41\n\x06\x43reate\x12\x19.chat.ChatCreationRequest\x1a\x1a.chat.ChatCreationResponse\"\x00\x12\x34\n\x03Get\x12\x14.chat.ChatGetRequest\x1a\x15.chat.ChatGetResponse\"\x00\x12\x37\n\x04List\x12\x15.chat.ChatListRequest\x1a\x16.chat.ChatListResponse\"\x00\x12\x41\n\x06\x44\x65lete\x12\x19.chat.ChatDeletionRequest\x1a\x1a.chat.ChatDeletionResponse\"\x00\x12=\n\x06Update\x12\x17.chat.ChatUpdateRequest\x1a\x18.chat.ChatUpdateResponse\"\x00\x12\x37\n\x04Star\x12\x15.chat.ChatStarRequest\x1a\x16.chat.ChatStarResponse\"\x00\x42-Z+github.com/jupyter-naas/naas-models/go/chatb\x06proto3') _MESSAGETYPE = DESCRIPTOR.enum_types_by_name['MessageType'] MessageType = enum_type_wrapper.EnumTypeWrapper(_MESSAGETYPE) _MESSAGEERROR = DESCRIPTOR.enum_types_by_name['MessageError'] MessageError = enum_type_wrapper.EnumTypeWrapper(_MESSAGEERROR) +_COMPLETIONSTATUS = DESCRIPTOR.enum_types_by_name['CompletionStatus'] +CompletionStatus = enum_type_wrapper.EnumTypeWrapper(_COMPLETIONSTATUS) _CHATERROR = DESCRIPTOR.enum_types_by_name['ChatError'] ChatError = enum_type_wrapper.EnumTypeWrapper(_CHATERROR) UNDEFINED = 0 @@ -34,6 +36,9 @@ MESSAGE_NOT_FOUND = 2 MESSAGE_NOT_UPDATED = 3 MESSAGE_NOT_AUTHORIZED = 4 +COMPLETED = 0 +FAILED = 1 +TIMEOUT = 2 CHAT_NO_ERROR = 0 CHAT_ALREADY_EXISTS = 1 CHAT_NOT_FOUND = 2 @@ -331,12 +336,14 @@ _MESSAGERATINGCREATIONREQUEST.fields_by_name['rating']._serialized_options = b'\372B\027r\0252\020^(LIKE|DISLIKE)$\320\001\000' _CHATMESSAGES_MESSAGESENTRY._options = None _CHATMESSAGES_MESSAGESENTRY._serialized_options = b'8\001' - _MESSAGETYPE._serialized_start=4438 - _MESSAGETYPE._serialized_end=4497 - _MESSAGEERROR._serialized_start=4500 - _MESSAGEERROR._serialized_end=4640 - _CHATERROR._serialized_start=4643 - _CHATERROR._serialized_end=4896 + _MESSAGETYPE._serialized_start=4494 + _MESSAGETYPE._serialized_end=4553 + _MESSAGEERROR._serialized_start=4556 + _MESSAGEERROR._serialized_end=4696 + _COMPLETIONSTATUS._serialized_start=4698 + _COMPLETIONSTATUS._serialized_end=4756 + _CHATERROR._serialized_start=4759 + _CHATERROR._serialized_end=5012 _MESSAGERESPONSEERROR._serialized_start=67 _MESSAGERESPONSEERROR._serialized_end=235 _MESSAGE._serialized_start=238 @@ -392,17 +399,17 @@ _CHATSTARRESPONSE._serialized_start=3587 _CHATSTARRESPONSE._serialized_end=3690 _COMPLETIONRESPONSE._serialized_start=3693 - _COMPLETIONRESPONSE._serialized_end=3930 - _BASEPAYLOAD._serialized_start=3932 - _BASEPAYLOAD._serialized_end=4031 - _CHATCOMPLETIONREQUEST._serialized_start=4033 - _CHATCOMPLETIONREQUEST._serialized_end=4150 - _CHATSTOPCOMPLETIONREQUEST._serialized_start=4152 - _CHATSTOPCOMPLETIONREQUEST._serialized_end=4203 - _CHATSTOPCOMPLETIONRESPONSE._serialized_start=4205 - _CHATSTOPCOMPLETIONRESPONSE._serialized_end=4288 - _CHATCOMPLETIONRESPONSE._serialized_start=4291 - _CHATCOMPLETIONRESPONSE._serialized_end=4436 - _CHATSERVICE._serialized_start=4899 - _CHATSERVICE._serialized_end=5277 + _COMPLETIONRESPONSE._serialized_end=3986 + _BASEPAYLOAD._serialized_start=3988 + _BASEPAYLOAD._serialized_end=4087 + _CHATCOMPLETIONREQUEST._serialized_start=4089 + _CHATCOMPLETIONREQUEST._serialized_end=4206 + _CHATSTOPCOMPLETIONREQUEST._serialized_start=4208 + _CHATSTOPCOMPLETIONREQUEST._serialized_end=4259 + _CHATSTOPCOMPLETIONRESPONSE._serialized_start=4261 + _CHATSTOPCOMPLETIONRESPONSE._serialized_end=4344 + _CHATCOMPLETIONRESPONSE._serialized_start=4347 + _CHATCOMPLETIONRESPONSE._serialized_end=4492 + _CHATSERVICE._serialized_start=5015 + _CHATSERVICE._serialized_end=5393 # @@protoc_insertion_point(module_scope) diff --git a/python/naas_models/pydantic/chat_p2p.py b/python/naas_models/pydantic/chat_p2p.py index 7595d46..e75a957 100644 --- a/python/naas_models/pydantic/chat_p2p.py +++ b/python/naas_models/pydantic/chat_p2p.py @@ -27,6 +27,12 @@ class MessageError(IntEnum): MESSAGE_NOT_AUTHORIZED = 4 +class CompletionStatus(IntEnum): + COMPLETED = 0 + FAILED = 1 + TIMEOUT = 2 + + class ChatError(IntEnum): CHAT_NO_ERROR = 0 CHAT_ALREADY_EXISTS = 1 @@ -344,7 +350,7 @@ class ChatStarResponse(BaseModel): class CompletionResponse(BaseModel): - _one_of_dict = {"CompletionResponse._image_resolution": {"fields": {"image_resolution"}}, "CompletionResponse._image_steps": {"fields": {"image_steps"}}, "CompletionResponse._input_tokens": {"fields": {"input_tokens"}}, "CompletionResponse._output_tokens": {"fields": {"output_tokens"}}} + _one_of_dict = {"CompletionResponse._image_resolution": {"fields": {"image_resolution"}}, "CompletionResponse._image_steps": {"fields": {"image_steps"}}, "CompletionResponse._input_tokens": {"fields": {"input_tokens"}}, "CompletionResponse._output_tokens": {"fields": {"output_tokens"}}, "CompletionResponse._status": {"fields": {"status"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) messages: typing.List[Message] = FieldInfo(default_factory=list) @@ -352,6 +358,7 @@ class CompletionResponse(BaseModel): output_tokens: int = FieldInfo(default=0) image_resolution: str = FieldInfo(default="") image_steps: int = FieldInfo(default=0) + status: CompletionStatus = FieldInfo(default=0)