src/server/internal/pb/llm.pb.go
10,492 bytes · 368 lines · capsule://quake0day/[email protected]
raw on github
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v5.29.3
// source: llm.proto
package pb
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 LLMRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Messages []*ChatMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
Config *LLMConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LLMRequest) Reset() {
*x = LLMRequest{}
mi := &file_llm_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LLMRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LLMRequest) ProtoMessage() {}
func (x *LLMRequest) ProtoReflect() protoreflect.Message {
mi := &file_llm_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 LLMRequest.ProtoReflect.Descriptor instead.
func (*LLMRequest) Descriptor() ([]byte, []int) {
return file_llm_proto_rawDescGZIP(), []int{0}
}
func (x *LLMRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *LLMRequest) GetMessages() []*ChatMessage {
if x != nil {
return x.Messages
}
return nil
}
func (x *LLMRequest) GetConfig() *LLMConfig {
if x != nil {
return x.Config
}
return nil
}
type ChatMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Images []*ImageFrame `protobuf:"bytes,3,rep,name=images,proto3" json:"images,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChatMessage) Reset() {
*x = ChatMessage{}
mi := &file_llm_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_llm_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_llm_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) GetImages() []*ImageFrame {
if x != nil {
return x.Images
}
return nil
}
type LLMConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
Temperature float32 `protobuf:"fixed32,2,opt,name=temperature,proto3" json:"temperature,omitempty"`
MaxTokens int32 `protobuf:"varint,3,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
Provider string `protobuf:"bytes,4,opt,name=provider,proto3" json:"provider,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LLMConfig) Reset() {
*x = LLMConfig{}
mi := &file_llm_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LLMConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LLMConfig) ProtoMessage() {}
func (x *LLMConfig) ProtoReflect() protoreflect.Message {
mi := &file_llm_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 LLMConfig.ProtoReflect.Descriptor instead.
func (*LLMConfig) Descriptor() ([]byte, []int) {
return file_llm_proto_rawDescGZIP(), []int{2}
}
func (x *LLMConfig) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *LLMConfig) GetTemperature() float32 {
if x != nil {
return x.Temperature
}
return 0
}
func (x *LLMConfig) GetMaxTokens() int32 {
if x != nil {
return x.MaxTokens
}
return 0
}
func (x *LLMConfig) GetProvider() string {
if x != nil {
return x.Provider
}
return ""
}
type LLMChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
AccumulatedText string `protobuf:"bytes,2,opt,name=accumulated_text,json=accumulatedText,proto3" json:"accumulated_text,omitempty"`
IsSentenceEnd bool `protobuf:"varint,3,opt,name=is_sentence_end,json=isSentenceEnd,proto3" json:"is_sentence_end,omitempty"`
IsFinal bool `protobuf:"varint,4,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LLMChunk) Reset() {
*x = LLMChunk{}
mi := &file_llm_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LLMChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LLMChunk) ProtoMessage() {}
func (x *LLMChunk) ProtoReflect() protoreflect.Message {
mi := &file_llm_proto_msgTypes[3]
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 LLMChunk.ProtoReflect.Descriptor instead.
func (*LLMChunk) Descriptor() ([]byte, []int) {
return file_llm_proto_rawDescGZIP(), []int{3}
}
func (x *LLMChunk) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *LLMChunk) GetAccumulatedText() string {
if x != nil {
return x.AccumulatedText
}
return ""
}
func (x *LLMChunk) GetIsSentenceEnd() bool {
if x != nil {
return x.IsSentenceEnd
}
return false
}
func (x *LLMChunk) GetIsFinal() bool {
if x != nil {
return x.IsFinal
}
return false
}
var File_llm_proto protoreflect.FileDescriptor
const file_llm_proto_rawDesc = "" +
"\n" +
"\tllm.proto\x12\n" +
"cyberverse\x1a\fcommon.proto\"\x8f\x01\n" +
"\n" +
"LLMRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x123\n" +
"\bmessages\x18\x02 \x03(\v2\x17.cyberverse.ChatMessageR\bmessages\x12-\n" +
"\x06config\x18\x03 \x01(\v2\x15.cyberverse.LLMConfigR\x06config\"k\n" +
"\vChatMessage\x12\x12\n" +
"\x04role\x18\x01 \x01(\tR\x04role\x12\x18\n" +
"\acontent\x18\x02 \x01(\tR\acontent\x12.\n" +
"\x06images\x18\x03 \x03(\v2\x16.cyberverse.ImageFrameR\x06images\"~\n" +
"\tLLMConfig\x12\x14\n" +
"\x05model\x18\x01 \x01(\tR\x05model\x12 \n" +
"\vtemperature\x18\x02 \x01(\x02R\vtemperature\x12\x1d\n" +
"\n" +
"max_tokens\x18\x03 \x01(\x05R\tmaxTokens\x12\x1a\n" +
"\bprovider\x18\x04 \x01(\tR\bprovider\"\x8e\x01\n" +
"\bLLMChunk\x12\x14\n" +
"\x05token\x18\x01 \x01(\tR\x05token\x12)\n" +
"\x10accumulated_text\x18\x02 \x01(\tR\x0faccumulatedText\x12&\n" +
"\x0fis_sentence_end\x18\x03 \x01(\bR\risSentenceEnd\x12\x19\n" +
"\bis_final\x18\x04 \x01(\bR\aisFinal2N\n" +
"\n" +
"LLMService\x12@\n" +
"\x0eGenerateStream\x12\x16.cyberverse.LLMRequest\x1a\x14.cyberverse.LLMChunk0\x01B*Z(github.com/cyberverse/server/internal/pbb\x06proto3"
var (
file_llm_proto_rawDescOnce sync.Once
file_llm_proto_rawDescData []byte
)
func file_llm_proto_rawDescGZIP() []byte {
file_llm_proto_rawDescOnce.Do(func() {
file_llm_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_llm_proto_rawDesc), len(file_llm_proto_rawDesc)))
})
return file_llm_proto_rawDescData
}
var file_llm_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_llm_proto_goTypes = []any{
(*LLMRequest)(nil), // 0: cyberverse.LLMRequest
(*ChatMessage)(nil), // 1: cyberverse.ChatMessage
(*LLMConfig)(nil), // 2: cyberverse.LLMConfig
(*LLMChunk)(nil), // 3: cyberverse.LLMChunk
(*ImageFrame)(nil), // 4: cyberverse.ImageFrame
}
var file_llm_proto_depIdxs = []int32{
1, // 0: cyberverse.LLMRequest.messages:type_name -> cyberverse.ChatMessage
2, // 1: cyberverse.LLMRequest.config:type_name -> cyberverse.LLMConfig
4, // 2: cyberverse.ChatMessage.images:type_name -> cyberverse.ImageFrame
0, // 3: cyberverse.LLMService.GenerateStream:input_type -> cyberverse.LLMRequest
3, // 4: cyberverse.LLMService.GenerateStream:output_type -> cyberverse.LLMChunk
4, // [4:5] is the sub-list for method output_type
3, // [3:4] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_llm_proto_init() }
func file_llm_proto_init() {
if File_llm_proto != nil {
return
}
file_common_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_llm_proto_rawDesc), len(file_llm_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_llm_proto_goTypes,
DependencyIndexes: file_llm_proto_depIdxs,
MessageInfos: file_llm_proto_msgTypes,
}.Build()
File_llm_proto = out.File
file_llm_proto_goTypes = nil
file_llm_proto_depIdxs = nil
}