l-ai-core-proto/ai.pb.go

1144 lines
40 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.34.0
// source: proto/l-ai-core-proto/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)
)
// AnswerStatus описывает, готов ли ответ синхронно или отложен в job.
type AnswerStatus int32
const (
AnswerStatus_ANSWER_STATUS_UNSPECIFIED AnswerStatus = 0 // трактуется как COMPLETE (обратная совместимость)
AnswerStatus_ANSWER_STATUS_COMPLETE AnswerStatus = 1 // content — финальный ответ
AnswerStatus_ANSWER_STATUS_PENDING AnswerStatus = 2 // запущена долгая job; поллить GetAnswerJob(job_id)
)
// Enum value maps for AnswerStatus.
var (
AnswerStatus_name = map[int32]string{
0: "ANSWER_STATUS_UNSPECIFIED",
1: "ANSWER_STATUS_COMPLETE",
2: "ANSWER_STATUS_PENDING",
}
AnswerStatus_value = map[string]int32{
"ANSWER_STATUS_UNSPECIFIED": 0,
"ANSWER_STATUS_COMPLETE": 1,
"ANSWER_STATUS_PENDING": 2,
}
)
func (x AnswerStatus) Enum() *AnswerStatus {
p := new(AnswerStatus)
*p = x
return p
}
func (x AnswerStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AnswerStatus) Descriptor() protoreflect.EnumDescriptor {
return file_proto_l_ai_core_proto_ai_proto_enumTypes[0].Descriptor()
}
func (AnswerStatus) Type() protoreflect.EnumType {
return &file_proto_l_ai_core_proto_ai_proto_enumTypes[0]
}
func (x AnswerStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AnswerStatus.Descriptor instead.
func (AnswerStatus) EnumDescriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{0}
}
// AnswerJobState — состояние отложенной генерации ответа.
type AnswerJobState int32
const (
AnswerJobState_ANSWER_JOB_STATE_UNSPECIFIED AnswerJobState = 0
AnswerJobState_ANSWER_JOB_STATE_PENDING AnswerJobState = 1 // ещё выполняется (evolver работает / модель дописывает)
AnswerJobState_ANSWER_JOB_STATE_DONE AnswerJobState = 2 // готово, content заполнен
AnswerJobState_ANSWER_JOB_STATE_FAILED AnswerJobState = 3 // ошибка, error заполнен
AnswerJobState_ANSWER_JOB_STATE_NOT_FOUND AnswerJobState = 4 // неизвестный/протухший job_id (напр. после рестарта core)
)
// Enum value maps for AnswerJobState.
var (
AnswerJobState_name = map[int32]string{
0: "ANSWER_JOB_STATE_UNSPECIFIED",
1: "ANSWER_JOB_STATE_PENDING",
2: "ANSWER_JOB_STATE_DONE",
3: "ANSWER_JOB_STATE_FAILED",
4: "ANSWER_JOB_STATE_NOT_FOUND",
}
AnswerJobState_value = map[string]int32{
"ANSWER_JOB_STATE_UNSPECIFIED": 0,
"ANSWER_JOB_STATE_PENDING": 1,
"ANSWER_JOB_STATE_DONE": 2,
"ANSWER_JOB_STATE_FAILED": 3,
"ANSWER_JOB_STATE_NOT_FOUND": 4,
}
)
func (x AnswerJobState) Enum() *AnswerJobState {
p := new(AnswerJobState)
*p = x
return p
}
func (x AnswerJobState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AnswerJobState) Descriptor() protoreflect.EnumDescriptor {
return file_proto_l_ai_core_proto_ai_proto_enumTypes[1].Descriptor()
}
func (AnswerJobState) Type() protoreflect.EnumType {
return &file_proto_l_ai_core_proto_ai_proto_enumTypes[1]
}
func (x AnswerJobState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AnswerJobState.Descriptor instead.
func (AnswerJobState) EnumDescriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{1}
}
// 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 бота для упоминаний
ModelName string `protobuf:"bytes,3,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` // Название модели (по умолчанию "deepseek-v4-flash")
EnableReasoning bool `protobuf:"varint,4,opt,name=enable_reasoning,json=enableReasoning,proto3" json:"enable_reasoning,omitempty"` // Включить режим рассуждений (по умолчанию false)
GlobalUserId int64 `protobuf:"varint,5,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` // Global user ID для получения доп. данных (профиль, воспоминания)
Options *AnswerGenerationOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` // Дополнительные опции генерации ответа
TelegramUserId int64 `protobuf:"varint,7,opt,name=telegram_user_id,json=telegramUserId,proto3" json:"telegram_user_id,omitempty"` // Telegram user ID для применения пользовательских настроек (стиль ответа)
SteamUserId int64 `protobuf:"varint,8,opt,name=steam_user_id,json=steamUserId,proto3" json:"steam_user_id,omitempty"` // SteamID64 отправителя для живых Steam-диалогов (l-ai-steam) - тот же "сигнал живого чата", что telegram_user_id, для второй платформы
SupportsDeferred bool `protobuf:"varint,9,opt,name=supports_deferred,json=supportsDeferred,proto3" json:"supports_deferred,omitempty"` // Клиент умеет обрабатывать status=PENDING + GetAnswerJob (async тяжёлые тулзы). Старые клиенты не ставят — тяжёлые тулзы исполняются синхронно, как раньше.
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AIRequest) Reset() {
*x = AIRequest{}
mi := &file_proto_l_ai_core_proto_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_proto_l_ai_core_proto_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_proto_l_ai_core_proto_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 ""
}
func (x *AIRequest) GetModelName() string {
if x != nil {
return x.ModelName
}
return ""
}
func (x *AIRequest) GetEnableReasoning() bool {
if x != nil {
return x.EnableReasoning
}
return false
}
func (x *AIRequest) GetGlobalUserId() int64 {
if x != nil {
return x.GlobalUserId
}
return 0
}
func (x *AIRequest) GetOptions() *AnswerGenerationOptions {
if x != nil {
return x.Options
}
return nil
}
func (x *AIRequest) GetTelegramUserId() int64 {
if x != nil {
return x.TelegramUserId
}
return 0
}
func (x *AIRequest) GetSteamUserId() int64 {
if x != nil {
return x.SteamUserId
}
return 0
}
func (x *AIRequest) GetSupportsDeferred() bool {
if x != nil {
return x.SupportsDeferred
}
return false
}
// AnswerGenerationOptions содержит дополнительные опции для генерации ответа
type AnswerGenerationOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
IncludeUserMemories bool `protobuf:"varint,1,opt,name=include_user_memories,json=includeUserMemories,proto3" json:"include_user_memories,omitempty"` // Включить воспоминания о пользователе в промпт
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AnswerGenerationOptions) Reset() {
*x = AnswerGenerationOptions{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AnswerGenerationOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnswerGenerationOptions) ProtoMessage() {}
func (x *AnswerGenerationOptions) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_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 AnswerGenerationOptions.ProtoReflect.Descriptor instead.
func (*AnswerGenerationOptions) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{1}
}
func (x *AnswerGenerationOptions) GetIncludeUserMemories() bool {
if x != nil {
return x.IncludeUserMemories
}
return false
}
// AIResponse содержит ответ от AI модели
type AIResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Текст ответа (при status=PENDING — interim-сообщение)
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"` // Время выполнения в миллисекундах
ReasoningContent string `protobuf:"bytes,4,opt,name=reasoning_content,json=reasoningContent,proto3" json:"reasoning_content,omitempty"` // Текст рассуждений (если включён режим reasoning)
Status AnswerStatus `protobuf:"varint,5,opt,name=status,proto3,enum=ai.AnswerStatus" json:"status,omitempty"` // COMPLETE (или UNSPECIFIED для старых клиентов) — content финальный;
// PENDING — запущена долгая job, content это interim, финал тянуть через GetAnswerJob(job_id)
JobId string `protobuf:"bytes,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // Идентификатор отложенной job (только при status=PENDING)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AIResponse) Reset() {
*x = AIResponse{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[2]
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_proto_l_ai_core_proto_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 AIResponse.ProtoReflect.Descriptor instead.
func (*AIResponse) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{2}
}
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
}
func (x *AIResponse) GetReasoningContent() string {
if x != nil {
return x.ReasoningContent
}
return ""
}
func (x *AIResponse) GetStatus() AnswerStatus {
if x != nil {
return x.Status
}
return AnswerStatus_ANSWER_STATUS_UNSPECIFIED
}
func (x *AIResponse) GetJobId() string {
if x != nil {
return x.JobId
}
return ""
}
// GetAnswerJobRequest запрашивает статус отложенной генерации ответа.
type GetAnswerJobRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetAnswerJobRequest) Reset() {
*x = GetAnswerJobRequest{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetAnswerJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAnswerJobRequest) ProtoMessage() {}
func (x *GetAnswerJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_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 GetAnswerJobRequest.ProtoReflect.Descriptor instead.
func (*GetAnswerJobRequest) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{3}
}
func (x *GetAnswerJobRequest) GetJobId() string {
if x != nil {
return x.JobId
}
return ""
}
// AnswerJobResponse — результат опроса отложенной генерации.
type AnswerJobResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
State AnswerJobState `protobuf:"varint,1,opt,name=state,proto3,enum=ai.AnswerJobState" json:"state,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // финальный ответ, когда DONE
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // причина, когда FAILED
DurationMs float64 `protobuf:"fixed64,4,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"` // суммарное время генерации, когда DONE
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AnswerJobResponse) Reset() {
*x = AnswerJobResponse{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AnswerJobResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnswerJobResponse) ProtoMessage() {}
func (x *AnswerJobResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[4]
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 AnswerJobResponse.ProtoReflect.Descriptor instead.
func (*AnswerJobResponse) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{4}
}
func (x *AnswerJobResponse) GetState() AnswerJobState {
if x != nil {
return x.State
}
return AnswerJobState_ANSWER_JOB_STATE_UNSPECIFIED
}
func (x *AnswerJobResponse) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *AnswerJobResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *AnswerJobResponse) GetDurationMs() float64 {
if x != nil {
return x.DurationMs
}
return 0
}
// CreateSessionRequest для создания новой AI сессии
type CreateSessionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Идентификатор пользователя
BotUsername string `protobuf:"bytes,2,opt,name=bot_username,json=botUsername,proto3" json:"bot_username,omitempty"` // Username бота для упоминаний
ModelName string `protobuf:"bytes,3,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` // Название модели (по умолчанию "deepseek-v4-flash")
TtlSeconds int64 `protobuf:"varint,4,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // Время жизни сессии в секундах (по умолчанию 3600 = 1 час)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateSessionRequest) Reset() {
*x = CreateSessionRequest{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateSessionRequest) ProtoMessage() {}
func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[5]
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 CreateSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateSessionRequest) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{5}
}
func (x *CreateSessionRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *CreateSessionRequest) GetBotUsername() string {
if x != nil {
return x.BotUsername
}
return ""
}
func (x *CreateSessionRequest) GetModelName() string {
if x != nil {
return x.ModelName
}
return ""
}
func (x *CreateSessionRequest) GetTtlSeconds() int64 {
if x != nil {
return x.TtlSeconds
}
return 0
}
// CreateSessionResponse содержит ID созданной сессии
type CreateSessionResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // ID сессии
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // Статус сессии
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Текст ошибки, если произошла
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateSessionResponse) Reset() {
*x = CreateSessionResponse{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateSessionResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateSessionResponse) ProtoMessage() {}
func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[6]
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 CreateSessionResponse.ProtoReflect.Descriptor instead.
func (*CreateSessionResponse) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{6}
}
func (x *CreateSessionResponse) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *CreateSessionResponse) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *CreateSessionResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
// AskInSessionRequest для запроса в рамках сессии
type AskInSessionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // ID сессии
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // Текст запроса
EnableReasoning bool `protobuf:"varint,3,opt,name=enable_reasoning,json=enableReasoning,proto3" json:"enable_reasoning,omitempty"` // Включить режим рассуждений (по умолчанию false)
GlobalUserId int64 `protobuf:"varint,4,opt,name=global_user_id,json=globalUserId,proto3" json:"global_user_id,omitempty"` // Global user ID для получения воспоминаний
Options *AnswerGenerationOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` // Дополнительные опции генерации
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AskInSessionRequest) Reset() {
*x = AskInSessionRequest{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AskInSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AskInSessionRequest) ProtoMessage() {}
func (x *AskInSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[7]
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 AskInSessionRequest.ProtoReflect.Descriptor instead.
func (*AskInSessionRequest) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{7}
}
func (x *AskInSessionRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *AskInSessionRequest) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (x *AskInSessionRequest) GetEnableReasoning() bool {
if x != nil {
return x.EnableReasoning
}
return false
}
func (x *AskInSessionRequest) GetGlobalUserId() int64 {
if x != nil {
return x.GlobalUserId
}
return 0
}
func (x *AskInSessionRequest) GetOptions() *AnswerGenerationOptions {
if x != nil {
return x.Options
}
return nil
}
// SessionStatusResponse содержит статус сессии и ответ AI
type SessionStatusResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // ID сессии
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // Статус сессии (active, expired, closed)
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // Текст ответа от AI
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // Текст ошибки, если произошла
DurationMs float64 `protobuf:"fixed64,5,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"` // Время выполнения в миллисекундах
ReasoningContent string `protobuf:"bytes,6,opt,name=reasoning_content,json=reasoningContent,proto3" json:"reasoning_content,omitempty"` // Текст рассуждений (если включён режим reasoning)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SessionStatusResponse) Reset() {
*x = SessionStatusResponse{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SessionStatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SessionStatusResponse) ProtoMessage() {}
func (x *SessionStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[8]
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 SessionStatusResponse.ProtoReflect.Descriptor instead.
func (*SessionStatusResponse) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{8}
}
func (x *SessionStatusResponse) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *SessionStatusResponse) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *SessionStatusResponse) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *SessionStatusResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *SessionStatusResponse) GetDurationMs() float64 {
if x != nil {
return x.DurationMs
}
return 0
}
func (x *SessionStatusResponse) GetReasoningContent() string {
if x != nil {
return x.ReasoningContent
}
return ""
}
// StatelessMessage одно сообщение для stateless запроса (role + content)
type StatelessMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // "system", "user", "assistant"
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // Текст сообщения
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatelessMessage) Reset() {
*x = StatelessMessage{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatelessMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatelessMessage) ProtoMessage() {}
func (x *StatelessMessage) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[9]
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 StatelessMessage.ProtoReflect.Descriptor instead.
func (*StatelessMessage) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{9}
}
func (x *StatelessMessage) GetRole() string {
if x != nil {
return x.Role
}
return ""
}
func (x *StatelessMessage) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
// StatelessRequest для stateless генерации с полным контролем над messages
type StatelessRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Messages []*StatelessMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // Массив сообщений (system + history + user)
ModelName string `protobuf:"bytes,2,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` // Название модели (по умолчанию "deepseek-v4-flash")
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatelessRequest) Reset() {
*x = StatelessRequest{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatelessRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatelessRequest) ProtoMessage() {}
func (x *StatelessRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[10]
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 StatelessRequest.ProtoReflect.Descriptor instead.
func (*StatelessRequest) Descriptor() ([]byte, []int) {
return file_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{10}
}
func (x *StatelessRequest) GetMessages() []*StatelessMessage {
if x != nil {
return x.Messages
}
return nil
}
func (x *StatelessRequest) GetModelName() string {
if x != nil {
return x.ModelName
}
return ""
}
// HealthCheckRequest для проверки здоровья сервиса
type HealthCheckRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HealthCheckRequest) Reset() {
*x = HealthCheckRequest{}
mi := &file_proto_l_ai_core_proto_ai_proto_msgTypes[11]
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_proto_l_ai_core_proto_ai_proto_msgTypes[11]
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_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{11}
}
// 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_proto_l_ai_core_proto_ai_proto_msgTypes[12]
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_proto_l_ai_core_proto_ai_proto_msgTypes[12]
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_proto_l_ai_core_proto_ai_proto_rawDescGZIP(), []int{12}
}
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_proto_l_ai_core_proto_ai_proto protoreflect.FileDescriptor
const file_proto_l_ai_core_proto_ai_proto_rawDesc = "" +
"\n" +
"\x1eproto/l-ai-core-proto/ai.proto\x12\x02ai\"\xe4\x02\n" +
"\tAIRequest\x12\x12\n" +
"\x04text\x18\x01 \x01(\tR\x04text\x12!\n" +
"\fbot_username\x18\x02 \x01(\tR\vbotUsername\x12\x1d\n" +
"\n" +
"model_name\x18\x03 \x01(\tR\tmodelName\x12)\n" +
"\x10enable_reasoning\x18\x04 \x01(\bR\x0fenableReasoning\x12$\n" +
"\x0eglobal_user_id\x18\x05 \x01(\x03R\fglobalUserId\x125\n" +
"\aoptions\x18\x06 \x01(\v2\x1b.ai.AnswerGenerationOptionsR\aoptions\x12(\n" +
"\x10telegram_user_id\x18\a \x01(\x03R\x0etelegramUserId\x12\"\n" +
"\rsteam_user_id\x18\b \x01(\x03R\vsteamUserId\x12+\n" +
"\x11supports_deferred\x18\t \x01(\bR\x10supportsDeferred\"M\n" +
"\x17AnswerGenerationOptions\x122\n" +
"\x15include_user_memories\x18\x01 \x01(\bR\x13includeUserMemories\"\xcb\x01\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\x12+\n" +
"\x11reasoning_content\x18\x04 \x01(\tR\x10reasoningContent\x12(\n" +
"\x06status\x18\x05 \x01(\x0e2\x10.ai.AnswerStatusR\x06status\x12\x15\n" +
"\x06job_id\x18\x06 \x01(\tR\x05jobId\",\n" +
"\x13GetAnswerJobRequest\x12\x15\n" +
"\x06job_id\x18\x01 \x01(\tR\x05jobId\"\x8e\x01\n" +
"\x11AnswerJobResponse\x12(\n" +
"\x05state\x18\x01 \x01(\x0e2\x12.ai.AnswerJobStateR\x05state\x12\x18\n" +
"\acontent\x18\x02 \x01(\tR\acontent\x12\x14\n" +
"\x05error\x18\x03 \x01(\tR\x05error\x12\x1f\n" +
"\vduration_ms\x18\x04 \x01(\x01R\n" +
"durationMs\"\x92\x01\n" +
"\x14CreateSessionRequest\x12\x17\n" +
"\auser_id\x18\x01 \x01(\tR\x06userId\x12!\n" +
"\fbot_username\x18\x02 \x01(\tR\vbotUsername\x12\x1d\n" +
"\n" +
"model_name\x18\x03 \x01(\tR\tmodelName\x12\x1f\n" +
"\vttl_seconds\x18\x04 \x01(\x03R\n" +
"ttlSeconds\"d\n" +
"\x15CreateSessionResponse\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" +
"\x06status\x18\x02 \x01(\tR\x06status\x12\x14\n" +
"\x05error\x18\x03 \x01(\tR\x05error\"\xd0\x01\n" +
"\x13AskInSessionRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" +
"\x04text\x18\x02 \x01(\tR\x04text\x12)\n" +
"\x10enable_reasoning\x18\x03 \x01(\bR\x0fenableReasoning\x12$\n" +
"\x0eglobal_user_id\x18\x04 \x01(\x03R\fglobalUserId\x125\n" +
"\aoptions\x18\x05 \x01(\v2\x1b.ai.AnswerGenerationOptionsR\aoptions\"\xcc\x01\n" +
"\x15SessionStatusResponse\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" +
"\x06status\x18\x02 \x01(\tR\x06status\x12\x18\n" +
"\acontent\x18\x03 \x01(\tR\acontent\x12\x14\n" +
"\x05error\x18\x04 \x01(\tR\x05error\x12\x1f\n" +
"\vduration_ms\x18\x05 \x01(\x01R\n" +
"durationMs\x12+\n" +
"\x11reasoning_content\x18\x06 \x01(\tR\x10reasoningContent\"@\n" +
"\x10StatelessMessage\x12\x12\n" +
"\x04role\x18\x01 \x01(\tR\x04role\x12\x18\n" +
"\acontent\x18\x02 \x01(\tR\acontent\"c\n" +
"\x10StatelessRequest\x120\n" +
"\bmessages\x18\x01 \x03(\v2\x14.ai.StatelessMessageR\bmessages\x12\x1d\n" +
"\n" +
"model_name\x18\x02 \x01(\tR\tmodelName\"\x14\n" +
"\x12HealthCheckRequest\"I\n" +
"\x13HealthCheckResponse\x12\x18\n" +
"\aserving\x18\x01 \x01(\bR\aserving\x12\x18\n" +
"\aversion\x18\x02 \x01(\tR\aversion*d\n" +
"\fAnswerStatus\x12\x1d\n" +
"\x19ANSWER_STATUS_UNSPECIFIED\x10\x00\x12\x1a\n" +
"\x16ANSWER_STATUS_COMPLETE\x10\x01\x12\x19\n" +
"\x15ANSWER_STATUS_PENDING\x10\x02*\xa8\x01\n" +
"\x0eAnswerJobState\x12 \n" +
"\x1cANSWER_JOB_STATE_UNSPECIFIED\x10\x00\x12\x1c\n" +
"\x18ANSWER_JOB_STATE_PENDING\x10\x01\x12\x19\n" +
"\x15ANSWER_JOB_STATE_DONE\x10\x02\x12\x1b\n" +
"\x17ANSWER_JOB_STATE_FAILED\x10\x03\x12\x1e\n" +
"\x1aANSWER_JOB_STATE_NOT_FOUND\x10\x042\x81\x03\n" +
"\tAIService\x12/\n" +
"\x0eGenerateAnswer\x12\r.ai.AIRequest\x1a\x0e.ai.AIResponse\x129\n" +
"\x11GenerateStateless\x12\x14.ai.StatelessRequest\x1a\x0e.ai.AIResponse\x12>\n" +
"\vHealthCheck\x12\x16.ai.HealthCheckRequest\x1a\x17.ai.HealthCheckResponse\x12D\n" +
"\rCreateSession\x12\x18.ai.CreateSessionRequest\x1a\x19.ai.CreateSessionResponse\x12B\n" +
"\fAskInSession\x12\x17.ai.AskInSessionRequest\x1a\x19.ai.SessionStatusResponse\x12>\n" +
"\fGetAnswerJob\x12\x17.ai.GetAnswerJobRequest\x1a\x15.ai.AnswerJobResponseB,Z*git.be.kaien.ru/l-ai/l-ai-core-proto/protob\x06proto3"
var (
file_proto_l_ai_core_proto_ai_proto_rawDescOnce sync.Once
file_proto_l_ai_core_proto_ai_proto_rawDescData []byte
)
func file_proto_l_ai_core_proto_ai_proto_rawDescGZIP() []byte {
file_proto_l_ai_core_proto_ai_proto_rawDescOnce.Do(func() {
file_proto_l_ai_core_proto_ai_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_l_ai_core_proto_ai_proto_rawDesc), len(file_proto_l_ai_core_proto_ai_proto_rawDesc)))
})
return file_proto_l_ai_core_proto_ai_proto_rawDescData
}
var file_proto_l_ai_core_proto_ai_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_proto_l_ai_core_proto_ai_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_proto_l_ai_core_proto_ai_proto_goTypes = []any{
(AnswerStatus)(0), // 0: ai.AnswerStatus
(AnswerJobState)(0), // 1: ai.AnswerJobState
(*AIRequest)(nil), // 2: ai.AIRequest
(*AnswerGenerationOptions)(nil), // 3: ai.AnswerGenerationOptions
(*AIResponse)(nil), // 4: ai.AIResponse
(*GetAnswerJobRequest)(nil), // 5: ai.GetAnswerJobRequest
(*AnswerJobResponse)(nil), // 6: ai.AnswerJobResponse
(*CreateSessionRequest)(nil), // 7: ai.CreateSessionRequest
(*CreateSessionResponse)(nil), // 8: ai.CreateSessionResponse
(*AskInSessionRequest)(nil), // 9: ai.AskInSessionRequest
(*SessionStatusResponse)(nil), // 10: ai.SessionStatusResponse
(*StatelessMessage)(nil), // 11: ai.StatelessMessage
(*StatelessRequest)(nil), // 12: ai.StatelessRequest
(*HealthCheckRequest)(nil), // 13: ai.HealthCheckRequest
(*HealthCheckResponse)(nil), // 14: ai.HealthCheckResponse
}
var file_proto_l_ai_core_proto_ai_proto_depIdxs = []int32{
3, // 0: ai.AIRequest.options:type_name -> ai.AnswerGenerationOptions
0, // 1: ai.AIResponse.status:type_name -> ai.AnswerStatus
1, // 2: ai.AnswerJobResponse.state:type_name -> ai.AnswerJobState
3, // 3: ai.AskInSessionRequest.options:type_name -> ai.AnswerGenerationOptions
11, // 4: ai.StatelessRequest.messages:type_name -> ai.StatelessMessage
2, // 5: ai.AIService.GenerateAnswer:input_type -> ai.AIRequest
12, // 6: ai.AIService.GenerateStateless:input_type -> ai.StatelessRequest
13, // 7: ai.AIService.HealthCheck:input_type -> ai.HealthCheckRequest
7, // 8: ai.AIService.CreateSession:input_type -> ai.CreateSessionRequest
9, // 9: ai.AIService.AskInSession:input_type -> ai.AskInSessionRequest
5, // 10: ai.AIService.GetAnswerJob:input_type -> ai.GetAnswerJobRequest
4, // 11: ai.AIService.GenerateAnswer:output_type -> ai.AIResponse
4, // 12: ai.AIService.GenerateStateless:output_type -> ai.AIResponse
14, // 13: ai.AIService.HealthCheck:output_type -> ai.HealthCheckResponse
8, // 14: ai.AIService.CreateSession:output_type -> ai.CreateSessionResponse
10, // 15: ai.AIService.AskInSession:output_type -> ai.SessionStatusResponse
6, // 16: ai.AIService.GetAnswerJob:output_type -> ai.AnswerJobResponse
11, // [11:17] is the sub-list for method output_type
5, // [5:11] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_proto_l_ai_core_proto_ai_proto_init() }
func file_proto_l_ai_core_proto_ai_proto_init() {
if File_proto_l_ai_core_proto_ai_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_l_ai_core_proto_ai_proto_rawDesc), len(file_proto_l_ai_core_proto_ai_proto_rawDesc)),
NumEnums: 2,
NumMessages: 13,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_l_ai_core_proto_ai_proto_goTypes,
DependencyIndexes: file_proto_l_ai_core_proto_ai_proto_depIdxs,
EnumInfos: file_proto_l_ai_core_proto_ai_proto_enumTypes,
MessageInfos: file_proto_l_ai_core_proto_ai_proto_msgTypes,
}.Build()
File_proto_l_ai_core_proto_ai_proto = out.File
file_proto_l_ai_core_proto_ai_proto_goTypes = nil
file_proto_l_ai_core_proto_ai_proto_depIdxs = nil
}