Add_reasoning_content_field

This commit is contained in:
Aleksander Ogurtsov 2026-03-15 16:52:45 +03:00
parent f8f20573a9
commit 2502112076
2 changed files with 18 additions and 8 deletions

View File

@ -96,6 +96,7 @@ type AIResponse struct {
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Текст ответа Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Текст ответа
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,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"` // Время выполнения в миллисекундах 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)
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@ -151,6 +152,13 @@ func (x *AIResponse) GetDurationMs() float64 {
return 0 return 0
} }
func (x *AIResponse) GetReasoningContent() string {
if x != nil {
return x.ReasoningContent
}
return ""
}
// HealthCheckRequest для проверки здоровья сервиса // HealthCheckRequest для проверки здоровья сервиса
type HealthCheckRequest struct { type HealthCheckRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
@ -251,13 +259,14 @@ const file_ai_proto_rawDesc = "" +
"\fbot_username\x18\x02 \x01(\tR\vbotUsername\x12\x1d\n" + "\fbot_username\x18\x02 \x01(\tR\vbotUsername\x12\x1d\n" +
"\n" + "\n" +
"model_name\x18\x03 \x01(\tR\tmodelName\x12)\n" + "model_name\x18\x03 \x01(\tR\tmodelName\x12)\n" +
"\x10enable_reasoning\x18\x04 \x01(\bR\x0fenableReasoning\"]\n" + "\x10enable_reasoning\x18\x04 \x01(\bR\x0fenableReasoning\"\x8a\x01\n" +
"\n" + "\n" +
"AIResponse\x12\x18\n" + "AIResponse\x12\x18\n" +
"\acontent\x18\x01 \x01(\tR\acontent\x12\x14\n" + "\acontent\x18\x01 \x01(\tR\acontent\x12\x14\n" +
"\x05error\x18\x02 \x01(\tR\x05error\x12\x1f\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12\x1f\n" +
"\vduration_ms\x18\x03 \x01(\x01R\n" + "\vduration_ms\x18\x03 \x01(\x01R\n" +
"durationMs\"\x14\n" + "durationMs\x12+\n" +
"\x11reasoning_content\x18\x04 \x01(\tR\x10reasoningContent\"\x14\n" +
"\x12HealthCheckRequest\"I\n" + "\x12HealthCheckRequest\"I\n" +
"\x13HealthCheckResponse\x12\x18\n" + "\x13HealthCheckResponse\x12\x18\n" +
"\aserving\x18\x01 \x01(\bR\aserving\x12\x18\n" + "\aserving\x18\x01 \x01(\bR\aserving\x12\x18\n" +

View File

@ -17,6 +17,7 @@ message AIResponse {
string content = 1; // Текст ответа string content = 1; // Текст ответа
string error = 2; // Текст ошибки, если произошла string error = 2; // Текст ошибки, если произошла
double duration_ms = 3; // Время выполнения в миллисекундах double duration_ms = 3; // Время выполнения в миллисекундах
string reasoning_content = 4; // Текст рассуждений (если включён режим reasoning)
} }
// HealthCheckRequest для проверки здоровья сервиса // HealthCheckRequest для проверки здоровья сервиса