llm/proto/chat.pb.go (214 lines of code) (raw):

// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v5.29.3 // source: chat.proto package chat import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ChatRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Messages []*ChatMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ChatRequest) Reset() { *x = ChatRequest{} mi := &file_chat_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ChatRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChatRequest) ProtoMessage() {} func (x *ChatRequest) ProtoReflect() protoreflect.Message { mi := &file_chat_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead. func (*ChatRequest) Descriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{0} } func (x *ChatRequest) GetMessages() []*ChatMessage { if x != nil { return x.Messages } return nil } func (x *ChatRequest) GetModel() string { if x != nil { return x.Model } return "" } type ChatMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // "human" or "ai" Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Bin []byte `protobuf:"bytes,3,opt,name=bin,proto3" json:"bin,omitempty"` // binary file unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ChatMessage) Reset() { *x = ChatMessage{} mi := &file_chat_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ChatMessage) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChatMessage) ProtoMessage() {} func (x *ChatMessage) ProtoReflect() protoreflect.Message { mi := &file_chat_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead. func (*ChatMessage) Descriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{1} } func (x *ChatMessage) GetRole() string { if x != nil { return x.Role } return "" } func (x *ChatMessage) GetContent() string { if x != nil { return x.Content } return "" } func (x *ChatMessage) GetBin() []byte { if x != nil { return x.Bin } return nil } type ChatResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ChatResponse) Reset() { *x = ChatResponse{} mi := &file_chat_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ChatResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChatResponse) ProtoMessage() {} func (x *ChatResponse) ProtoReflect() protoreflect.Message { mi := &file_chat_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead. func (*ChatResponse) Descriptor() ([]byte, []int) { return file_chat_proto_rawDescGZIP(), []int{2} } func (x *ChatResponse) GetContent() string { if x != nil { return x.Content } return "" } func (x *ChatResponse) GetModel() string { if x != nil { return x.Model } return "" } var File_chat_proto protoreflect.FileDescriptor const file_chat_proto_rawDesc = "" + "\n" + "\n" + "chat.proto\x12\x04chat\"R\n" + "\vChatRequest\x12-\n" + "\bmessages\x18\x01 \x03(\v2\x11.chat.ChatMessageR\bmessages\x12\x14\n" + "\x05model\x18\x02 \x01(\tR\x05model\"M\n" + "\vChatMessage\x12\x12\n" + "\x04role\x18\x01 \x01(\tR\x04role\x12\x18\n" + "\acontent\x18\x02 \x01(\tR\acontent\x12\x10\n" + "\x03bin\x18\x03 \x01(\fR\x03bin\">\n" + "\fChatResponse\x12\x18\n" + "\acontent\x18\x01 \x01(\tR\acontent\x12\x14\n" + "\x05model\x18\x02 \x01(\tR\x05model2@\n" + "\vChatService\x121\n" + "\x04Chat\x12\x11.chat.ChatRequest\x1a\x12.chat.ChatResponse\"\x000\x01B3Z1github.com/apache/dubbo-go-samples/llm/proto;chatb\x06proto3" var ( file_chat_proto_rawDescOnce sync.Once file_chat_proto_rawDescData []byte ) func file_chat_proto_rawDescGZIP() []byte { file_chat_proto_rawDescOnce.Do(func() { file_chat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(file_chat_proto_rawDesc))) }) return file_chat_proto_rawDescData } var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_chat_proto_goTypes = []any{ (*ChatRequest)(nil), // 0: chat.ChatRequest (*ChatMessage)(nil), // 1: chat.ChatMessage (*ChatResponse)(nil), // 2: chat.ChatResponse } var file_chat_proto_depIdxs = []int32{ 1, // 0: chat.ChatRequest.messages:type_name -> chat.ChatMessage 0, // 1: chat.ChatService.Chat:input_type -> chat.ChatRequest 2, // 2: chat.ChatService.Chat:output_type -> chat.ChatResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_chat_proto_init() } func file_chat_proto_init() { if File_chat_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(file_chat_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, GoTypes: file_chat_proto_goTypes, DependencyIndexes: file_chat_proto_depIdxs, MessageInfos: file_chat_proto_msgTypes, }.Build() File_chat_proto = out.File file_chat_proto_goTypes = nil file_chat_proto_depIdxs = nil }