304 lines
8.8 KiB
Go
304 lines
8.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v7.34.0
|
|
// source: ai.proto
|
|
|
|
package proto
|
|
|
|
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)
|
|
)
|
|
|
|
// AIRequest содержит запрос к AI модели
|
|
type AIRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Текст запроса
|
|
BotUsername string `protobuf:"bytes,2,opt,name=bot_username,json=botUsername,proto3" json:"bot_username,omitempty"` // Username бота для упоминаний
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AIRequest) Reset() {
|
|
*x = AIRequest{}
|
|
mi := &file_ai_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AIRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AIRequest) ProtoMessage() {}
|
|
|
|
func (x *AIRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ai_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 AIRequest.ProtoReflect.Descriptor instead.
|
|
func (*AIRequest) Descriptor() ([]byte, []int) {
|
|
return file_ai_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *AIRequest) GetText() string {
|
|
if x != nil {
|
|
return x.Text
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AIRequest) GetBotUsername() string {
|
|
if x != nil {
|
|
return x.BotUsername
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// AIResponse содержит ответ от AI модели
|
|
type AIResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Текст ответа
|
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // Текст ошибки, если произошла
|
|
DurationMs float64 `protobuf:"fixed64,3,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"` // Время выполнения в миллисекундах
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AIResponse) Reset() {
|
|
*x = AIResponse{}
|
|
mi := &file_ai_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AIResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AIResponse) ProtoMessage() {}
|
|
|
|
func (x *AIResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ai_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 AIResponse.ProtoReflect.Descriptor instead.
|
|
func (*AIResponse) Descriptor() ([]byte, []int) {
|
|
return file_ai_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *AIResponse) GetContent() string {
|
|
if x != nil {
|
|
return x.Content
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AIResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AIResponse) GetDurationMs() float64 {
|
|
if x != nil {
|
|
return x.DurationMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// HealthCheckRequest для проверки здоровья сервиса
|
|
type HealthCheckRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *HealthCheckRequest) Reset() {
|
|
*x = HealthCheckRequest{}
|
|
mi := &file_ai_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *HealthCheckRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HealthCheckRequest) ProtoMessage() {}
|
|
|
|
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ai_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 HealthCheckRequest.ProtoReflect.Descriptor instead.
|
|
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
|
|
return file_ai_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
// HealthCheckResponse для ответа на проверку здоровья
|
|
type HealthCheckResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Serving bool `protobuf:"varint,1,opt,name=serving,proto3" json:"serving,omitempty"`
|
|
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *HealthCheckResponse) Reset() {
|
|
*x = HealthCheckResponse{}
|
|
mi := &file_ai_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *HealthCheckResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HealthCheckResponse) ProtoMessage() {}
|
|
|
|
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ai_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 HealthCheckResponse.ProtoReflect.Descriptor instead.
|
|
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
|
|
return file_ai_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *HealthCheckResponse) GetServing() bool {
|
|
if x != nil {
|
|
return x.Serving
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HealthCheckResponse) GetVersion() string {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_ai_proto protoreflect.FileDescriptor
|
|
|
|
const file_ai_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\bai.proto\x12\x02ai\"B\n" +
|
|
"\tAIRequest\x12\x12\n" +
|
|
"\x04text\x18\x01 \x01(\tR\x04text\x12!\n" +
|
|
"\fbot_username\x18\x02 \x01(\tR\vbotUsername\"]\n" +
|
|
"\n" +
|
|
"AIResponse\x12\x18\n" +
|
|
"\acontent\x18\x01 \x01(\tR\acontent\x12\x14\n" +
|
|
"\x05error\x18\x02 \x01(\tR\x05error\x12\x1f\n" +
|
|
"\vduration_ms\x18\x03 \x01(\x01R\n" +
|
|
"durationMs\"\x14\n" +
|
|
"\x12HealthCheckRequest\"I\n" +
|
|
"\x13HealthCheckResponse\x12\x18\n" +
|
|
"\aserving\x18\x01 \x01(\bR\aserving\x12\x18\n" +
|
|
"\aversion\x18\x02 \x01(\tR\aversion2|\n" +
|
|
"\tAIService\x12/\n" +
|
|
"\x0eGenerateAnswer\x12\r.ai.AIRequest\x1a\x0e.ai.AIResponse\x12>\n" +
|
|
"\vHealthCheck\x12\x16.ai.HealthCheckRequest\x1a\x17.ai.HealthCheckResponseB'Z%github.com/l-ai/l-ai-core-proto/protob\x06proto3"
|
|
|
|
var (
|
|
file_ai_proto_rawDescOnce sync.Once
|
|
file_ai_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_ai_proto_rawDescGZIP() []byte {
|
|
file_ai_proto_rawDescOnce.Do(func() {
|
|
file_ai_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ai_proto_rawDesc), len(file_ai_proto_rawDesc)))
|
|
})
|
|
return file_ai_proto_rawDescData
|
|
}
|
|
|
|
var file_ai_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
var file_ai_proto_goTypes = []any{
|
|
(*AIRequest)(nil), // 0: ai.AIRequest
|
|
(*AIResponse)(nil), // 1: ai.AIResponse
|
|
(*HealthCheckRequest)(nil), // 2: ai.HealthCheckRequest
|
|
(*HealthCheckResponse)(nil), // 3: ai.HealthCheckResponse
|
|
}
|
|
var file_ai_proto_depIdxs = []int32{
|
|
0, // 0: ai.AIService.GenerateAnswer:input_type -> ai.AIRequest
|
|
2, // 1: ai.AIService.HealthCheck:input_type -> ai.HealthCheckRequest
|
|
1, // 2: ai.AIService.GenerateAnswer:output_type -> ai.AIResponse
|
|
3, // 3: ai.AIService.HealthCheck:output_type -> ai.HealthCheckResponse
|
|
2, // [2:4] is the sub-list for method output_type
|
|
0, // [0:2] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_ai_proto_init() }
|
|
func file_ai_proto_init() {
|
|
if File_ai_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ai_proto_rawDesc), len(file_ai_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 4,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_ai_proto_goTypes,
|
|
DependencyIndexes: file_ai_proto_depIdxs,
|
|
MessageInfos: file_ai_proto_msgTypes,
|
|
}.Build()
|
|
File_ai_proto = out.File
|
|
file_ai_proto_goTypes = nil
|
|
file_ai_proto_depIdxs = nil
|
|
}
|