Add_gRPC_methods
This commit is contained in:
parent
1bb8f274b9
commit
96fb69e20e
453
memory.pb.go
453
memory.pb.go
@ -674,6 +674,364 @@ func (x *HealthCheckResponse) GetVersion() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetRelevantMemoriesRequest запрос на получение релевантных воспоминаний
|
||||
type GetRelevantMemoriesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
||||
CurrentMessage string `protobuf:"bytes,3,opt,name=current_message,json=currentMessage,proto3" json:"current_message,omitempty"` // Для генерации тегов
|
||||
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) Reset() {
|
||||
*x = GetRelevantMemoriesRequest{}
|
||||
mi := &file_memory_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetRelevantMemoriesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_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 GetRelevantMemoriesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetRelevantMemoriesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) GetCurrentMessage() string {
|
||||
if x != nil {
|
||||
return x.CurrentMessage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesRequest) GetLimit() int32 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// GetRelevantMemoriesResponse ответ с релевантными воспоминаниями
|
||||
type GetRelevantMemoriesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Memories []*Memory `protobuf:"bytes,1,rep,name=memories,proto3" json:"memories,omitempty"`
|
||||
FormattedPrompt string `protobuf:"bytes,2,opt,name=formatted_prompt,json=formattedPrompt,proto3" json:"formatted_prompt,omitempty"` // Готовый блок для вставки в промпт
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesResponse) Reset() {
|
||||
*x = GetRelevantMemoriesResponse{}
|
||||
mi := &file_memory_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetRelevantMemoriesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetRelevantMemoriesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_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 GetRelevantMemoriesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetRelevantMemoriesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesResponse) GetMemories() []*Memory {
|
||||
if x != nil {
|
||||
return x.Memories
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetRelevantMemoriesResponse) GetFormattedPrompt() string {
|
||||
if x != nil {
|
||||
return x.FormattedPrompt
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetMemoriesByUserRequest запрос на получение всех воспоминаний пользователя
|
||||
type GetMemoriesByUserRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserRequest) Reset() {
|
||||
*x = GetMemoriesByUserRequest{}
|
||||
mi := &file_memory_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetMemoriesByUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetMemoriesByUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_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 GetMemoriesByUserRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetMemoriesByUserRequest) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetMemoriesByUserResponse ответ с воспоминаниями пользователя
|
||||
type GetMemoriesByUserResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Memories []*Memory `protobuf:"bytes,1,rep,name=memories,proto3" json:"memories,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserResponse) Reset() {
|
||||
*x = GetMemoriesByUserResponse{}
|
||||
mi := &file_memory_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetMemoriesByUserResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetMemoriesByUserResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_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 GetMemoriesByUserResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetMemoriesByUserResponse) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *GetMemoriesByUserResponse) GetMemories() []*Memory {
|
||||
if x != nil {
|
||||
return x.Memories
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BulkRefreshRequest запрос на массовую обработку сообщений
|
||||
type BulkRefreshRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Messages []string `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` // Список сообщений для обработки
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BulkRefreshRequest) Reset() {
|
||||
*x = BulkRefreshRequest{}
|
||||
mi := &file_memory_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BulkRefreshRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BulkRefreshRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BulkRefreshRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_proto_msgTypes[13]
|
||||
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 BulkRefreshRequest.ProtoReflect.Descriptor instead.
|
||||
func (*BulkRefreshRequest) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *BulkRefreshRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BulkRefreshRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BulkRefreshRequest) GetMessages() []string {
|
||||
if x != nil {
|
||||
return x.Messages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BulkRefreshResponse ответ с результатами массовой обработки
|
||||
type BulkRefreshResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
MessagesProcessed int32 `protobuf:"varint,3,opt,name=messages_processed,json=messagesProcessed,proto3" json:"messages_processed,omitempty"`
|
||||
FactsExtracted int32 `protobuf:"varint,4,opt,name=facts_extracted,json=factsExtracted,proto3" json:"facts_extracted,omitempty"`
|
||||
BatchCount int32 `protobuf:"varint,5,opt,name=batch_count,json=batchCount,proto3" json:"batch_count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) Reset() {
|
||||
*x = BulkRefreshResponse{}
|
||||
mi := &file_memory_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BulkRefreshResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BulkRefreshResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_memory_proto_msgTypes[14]
|
||||
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 BulkRefreshResponse.ProtoReflect.Descriptor instead.
|
||||
func (*BulkRefreshResponse) Descriptor() ([]byte, []int) {
|
||||
return file_memory_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) GetError() string {
|
||||
if x != nil {
|
||||
return x.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) GetMessagesProcessed() int32 {
|
||||
if x != nil {
|
||||
return x.MessagesProcessed
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) GetFactsExtracted() int32 {
|
||||
if x != nil {
|
||||
return x.FactsExtracted
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BulkRefreshResponse) GetBatchCount() int32 {
|
||||
if x != nil {
|
||||
return x.BatchCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_memory_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_memory_proto_rawDesc = "" +
|
||||
@ -735,11 +1093,38 @@ const file_memory_proto_rawDesc = "" +
|
||||
"\x12HealthCheckRequest\"I\n" +
|
||||
"\x13HealthCheckResponse\x12\x18\n" +
|
||||
"\aserving\x18\x01 \x01(\bR\aserving\x12\x18\n" +
|
||||
"\aversion\x18\x02 \x01(\tR\aversion2\xb8\x02\n" +
|
||||
"\aversion\x18\x02 \x01(\tR\aversion\"\x90\x01\n" +
|
||||
"\x1aGetRelevantMemoriesRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12'\n" +
|
||||
"\x0fcurrent_message\x18\x03 \x01(\tR\x0ecurrentMessage\x12\x14\n" +
|
||||
"\x05limit\x18\x04 \x01(\x05R\x05limit\"t\n" +
|
||||
"\x1bGetRelevantMemoriesResponse\x12*\n" +
|
||||
"\bmemories\x18\x01 \x03(\v2\x0e.memory.MemoryR\bmemories\x12)\n" +
|
||||
"\x10formatted_prompt\x18\x02 \x01(\tR\x0fformattedPrompt\"O\n" +
|
||||
"\x18GetMemoriesByUserRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\"G\n" +
|
||||
"\x19GetMemoriesByUserResponse\x12*\n" +
|
||||
"\bmemories\x18\x01 \x03(\v2\x0e.memory.MemoryR\bmemories\"e\n" +
|
||||
"\x12BulkRefreshRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\busername\x18\x02 \x01(\tR\busername\x12\x1a\n" +
|
||||
"\bmessages\x18\x03 \x03(\tR\bmessages\"\xbe\x01\n" +
|
||||
"\x13BulkRefreshResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||
"\x05error\x18\x02 \x01(\tR\x05error\x12-\n" +
|
||||
"\x12messages_processed\x18\x03 \x01(\x05R\x11messagesProcessed\x12'\n" +
|
||||
"\x0ffacts_extracted\x18\x04 \x01(\x05R\x0efactsExtracted\x12\x1f\n" +
|
||||
"\vbatch_count\x18\x05 \x01(\x05R\n" +
|
||||
"batchCount2\xba\x04\n" +
|
||||
"\rMemoryService\x12F\n" +
|
||||
"\vStoreMemory\x12\x1a.memory.StoreMemoryRequest\x1a\x1b.memory.StoreMemoryResponse\x12F\n" +
|
||||
"\vGetMemories\x12\x1a.memory.GetMemoriesRequest\x1a\x1b.memory.GetMemoriesResponse\x12O\n" +
|
||||
"\x0eProcessMessage\x12\x1d.memory.ProcessMessageRequest\x1a\x1e.memory.ProcessMessageResponse\x12F\n" +
|
||||
"\x0eProcessMessage\x12\x1d.memory.ProcessMessageRequest\x1a\x1e.memory.ProcessMessageResponse\x12^\n" +
|
||||
"\x13GetRelevantMemories\x12\".memory.GetRelevantMemoriesRequest\x1a#.memory.GetRelevantMemoriesResponse\x12X\n" +
|
||||
"\x11GetMemoriesByUser\x12 .memory.GetMemoriesByUserRequest\x1a!.memory.GetMemoriesByUserResponse\x12F\n" +
|
||||
"\vBulkRefresh\x12\x1a.memory.BulkRefreshRequest\x1a\x1b.memory.BulkRefreshResponse\x12F\n" +
|
||||
"\vHealthCheck\x12\x1a.memory.HealthCheckRequest\x1a\x1b.memory.HealthCheckResponseB*Z(git.be.kaien.ru/l-ai/l-ai-memories/protob\x06proto3"
|
||||
|
||||
var (
|
||||
@ -754,33 +1139,47 @@ func file_memory_proto_rawDescGZIP() []byte {
|
||||
return file_memory_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_memory_proto_goTypes = []any{
|
||||
(*Memory)(nil), // 0: memory.Memory
|
||||
(*StoreMemoryRequest)(nil), // 1: memory.StoreMemoryRequest
|
||||
(*StoreMemoryResponse)(nil), // 2: memory.StoreMemoryResponse
|
||||
(*GetMemoriesRequest)(nil), // 3: memory.GetMemoriesRequest
|
||||
(*GetMemoriesResponse)(nil), // 4: memory.GetMemoriesResponse
|
||||
(*ProcessMessageRequest)(nil), // 5: memory.ProcessMessageRequest
|
||||
(*ProcessMessageResponse)(nil), // 6: memory.ProcessMessageResponse
|
||||
(*HealthCheckRequest)(nil), // 7: memory.HealthCheckRequest
|
||||
(*HealthCheckResponse)(nil), // 8: memory.HealthCheckResponse
|
||||
(*Memory)(nil), // 0: memory.Memory
|
||||
(*StoreMemoryRequest)(nil), // 1: memory.StoreMemoryRequest
|
||||
(*StoreMemoryResponse)(nil), // 2: memory.StoreMemoryResponse
|
||||
(*GetMemoriesRequest)(nil), // 3: memory.GetMemoriesRequest
|
||||
(*GetMemoriesResponse)(nil), // 4: memory.GetMemoriesResponse
|
||||
(*ProcessMessageRequest)(nil), // 5: memory.ProcessMessageRequest
|
||||
(*ProcessMessageResponse)(nil), // 6: memory.ProcessMessageResponse
|
||||
(*HealthCheckRequest)(nil), // 7: memory.HealthCheckRequest
|
||||
(*HealthCheckResponse)(nil), // 8: memory.HealthCheckResponse
|
||||
(*GetRelevantMemoriesRequest)(nil), // 9: memory.GetRelevantMemoriesRequest
|
||||
(*GetRelevantMemoriesResponse)(nil), // 10: memory.GetRelevantMemoriesResponse
|
||||
(*GetMemoriesByUserRequest)(nil), // 11: memory.GetMemoriesByUserRequest
|
||||
(*GetMemoriesByUserResponse)(nil), // 12: memory.GetMemoriesByUserResponse
|
||||
(*BulkRefreshRequest)(nil), // 13: memory.BulkRefreshRequest
|
||||
(*BulkRefreshResponse)(nil), // 14: memory.BulkRefreshResponse
|
||||
}
|
||||
var file_memory_proto_depIdxs = []int32{
|
||||
0, // 0: memory.GetMemoriesResponse.memories:type_name -> memory.Memory
|
||||
1, // 1: memory.MemoryService.StoreMemory:input_type -> memory.StoreMemoryRequest
|
||||
3, // 2: memory.MemoryService.GetMemories:input_type -> memory.GetMemoriesRequest
|
||||
5, // 3: memory.MemoryService.ProcessMessage:input_type -> memory.ProcessMessageRequest
|
||||
7, // 4: memory.MemoryService.HealthCheck:input_type -> memory.HealthCheckRequest
|
||||
2, // 5: memory.MemoryService.StoreMemory:output_type -> memory.StoreMemoryResponse
|
||||
4, // 6: memory.MemoryService.GetMemories:output_type -> memory.GetMemoriesResponse
|
||||
6, // 7: memory.MemoryService.ProcessMessage:output_type -> memory.ProcessMessageResponse
|
||||
8, // 8: memory.MemoryService.HealthCheck:output_type -> memory.HealthCheckResponse
|
||||
5, // [5:9] is the sub-list for method output_type
|
||||
1, // [1:5] 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
|
||||
0, // 0: memory.GetMemoriesResponse.memories:type_name -> memory.Memory
|
||||
0, // 1: memory.GetRelevantMemoriesResponse.memories:type_name -> memory.Memory
|
||||
0, // 2: memory.GetMemoriesByUserResponse.memories:type_name -> memory.Memory
|
||||
1, // 3: memory.MemoryService.StoreMemory:input_type -> memory.StoreMemoryRequest
|
||||
3, // 4: memory.MemoryService.GetMemories:input_type -> memory.GetMemoriesRequest
|
||||
5, // 5: memory.MemoryService.ProcessMessage:input_type -> memory.ProcessMessageRequest
|
||||
9, // 6: memory.MemoryService.GetRelevantMemories:input_type -> memory.GetRelevantMemoriesRequest
|
||||
11, // 7: memory.MemoryService.GetMemoriesByUser:input_type -> memory.GetMemoriesByUserRequest
|
||||
13, // 8: memory.MemoryService.BulkRefresh:input_type -> memory.BulkRefreshRequest
|
||||
7, // 9: memory.MemoryService.HealthCheck:input_type -> memory.HealthCheckRequest
|
||||
2, // 10: memory.MemoryService.StoreMemory:output_type -> memory.StoreMemoryResponse
|
||||
4, // 11: memory.MemoryService.GetMemories:output_type -> memory.GetMemoriesResponse
|
||||
6, // 12: memory.MemoryService.ProcessMessage:output_type -> memory.ProcessMessageResponse
|
||||
10, // 13: memory.MemoryService.GetRelevantMemories:output_type -> memory.GetRelevantMemoriesResponse
|
||||
12, // 14: memory.MemoryService.GetMemoriesByUser:output_type -> memory.GetMemoriesByUserResponse
|
||||
14, // 15: memory.MemoryService.BulkRefresh:output_type -> memory.BulkRefreshResponse
|
||||
8, // 16: memory.MemoryService.HealthCheck:output_type -> memory.HealthCheckResponse
|
||||
10, // [10:17] is the sub-list for method output_type
|
||||
3, // [3:10] 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_memory_proto_init() }
|
||||
@ -794,7 +1193,7 @@ func file_memory_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_memory_proto_rawDesc), len(file_memory_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumMessages: 15,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
50
memory.proto
50
memory.proto
@ -79,6 +79,47 @@ message HealthCheckResponse {
|
||||
string version = 2;
|
||||
}
|
||||
|
||||
// GetRelevantMemoriesRequest запрос на получение релевантных воспоминаний
|
||||
message GetRelevantMemoriesRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
string current_message = 3; // Для генерации тегов
|
||||
int32 limit = 4;
|
||||
}
|
||||
|
||||
// GetRelevantMemoriesResponse ответ с релевантными воспоминаниями
|
||||
message GetRelevantMemoriesResponse {
|
||||
repeated Memory memories = 1;
|
||||
string formatted_prompt = 2; // Готовый блок для вставки в промпт
|
||||
}
|
||||
|
||||
// GetMemoriesByUserRequest запрос на получение всех воспоминаний пользователя
|
||||
message GetMemoriesByUserRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
}
|
||||
|
||||
// GetMemoriesByUserResponse ответ с воспоминаниями пользователя
|
||||
message GetMemoriesByUserResponse {
|
||||
repeated Memory memories = 1;
|
||||
}
|
||||
|
||||
// BulkRefreshRequest запрос на массовую обработку сообщений
|
||||
message BulkRefreshRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
repeated string messages = 3; // Список сообщений для обработки
|
||||
}
|
||||
|
||||
// BulkRefreshResponse ответ с результатами массовой обработки
|
||||
message BulkRefreshResponse {
|
||||
bool success = 1;
|
||||
string error = 2;
|
||||
int32 messages_processed = 3;
|
||||
int32 facts_extracted = 4;
|
||||
int32 batch_count = 5;
|
||||
}
|
||||
|
||||
// MemoryService - сервис для работы с памятью
|
||||
service MemoryService {
|
||||
// StoreMemory сохраняет воспоминание
|
||||
@ -90,6 +131,15 @@ service MemoryService {
|
||||
// ProcessMessage обрабатывает сообщение и извлекает факты
|
||||
rpc ProcessMessage(ProcessMessageRequest) returns (ProcessMessageResponse);
|
||||
|
||||
// GetRelevantMemories получает релевантные воспоминания для текущего сообщения
|
||||
rpc GetRelevantMemories(GetRelevantMemoriesRequest) returns (GetRelevantMemoriesResponse);
|
||||
|
||||
// GetMemoriesByUser получает все воспоминания пользователя
|
||||
rpc GetMemoriesByUser(GetMemoriesByUserRequest) returns (GetMemoriesByUserResponse);
|
||||
|
||||
// BulkRefresh обрабатывает множество сообщений для извлечения фактов
|
||||
rpc BulkRefresh(BulkRefreshRequest) returns (BulkRefreshResponse);
|
||||
|
||||
// HealthCheck проверяет здоровье сервиса
|
||||
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
|
||||
}
|
||||
|
||||
@ -19,10 +19,13 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
MemoryService_StoreMemory_FullMethodName = "/memory.MemoryService/StoreMemory"
|
||||
MemoryService_GetMemories_FullMethodName = "/memory.MemoryService/GetMemories"
|
||||
MemoryService_ProcessMessage_FullMethodName = "/memory.MemoryService/ProcessMessage"
|
||||
MemoryService_HealthCheck_FullMethodName = "/memory.MemoryService/HealthCheck"
|
||||
MemoryService_StoreMemory_FullMethodName = "/memory.MemoryService/StoreMemory"
|
||||
MemoryService_GetMemories_FullMethodName = "/memory.MemoryService/GetMemories"
|
||||
MemoryService_ProcessMessage_FullMethodName = "/memory.MemoryService/ProcessMessage"
|
||||
MemoryService_GetRelevantMemories_FullMethodName = "/memory.MemoryService/GetRelevantMemories"
|
||||
MemoryService_GetMemoriesByUser_FullMethodName = "/memory.MemoryService/GetMemoriesByUser"
|
||||
MemoryService_BulkRefresh_FullMethodName = "/memory.MemoryService/BulkRefresh"
|
||||
MemoryService_HealthCheck_FullMethodName = "/memory.MemoryService/HealthCheck"
|
||||
)
|
||||
|
||||
// MemoryServiceClient is the client API for MemoryService service.
|
||||
@ -37,6 +40,12 @@ type MemoryServiceClient interface {
|
||||
GetMemories(ctx context.Context, in *GetMemoriesRequest, opts ...grpc.CallOption) (*GetMemoriesResponse, error)
|
||||
// ProcessMessage обрабатывает сообщение и извлекает факты
|
||||
ProcessMessage(ctx context.Context, in *ProcessMessageRequest, opts ...grpc.CallOption) (*ProcessMessageResponse, error)
|
||||
// GetRelevantMemories получает релевантные воспоминания для текущего сообщения
|
||||
GetRelevantMemories(ctx context.Context, in *GetRelevantMemoriesRequest, opts ...grpc.CallOption) (*GetRelevantMemoriesResponse, error)
|
||||
// GetMemoriesByUser получает все воспоминания пользователя
|
||||
GetMemoriesByUser(ctx context.Context, in *GetMemoriesByUserRequest, opts ...grpc.CallOption) (*GetMemoriesByUserResponse, error)
|
||||
// BulkRefresh обрабатывает множество сообщений для извлечения фактов
|
||||
BulkRefresh(ctx context.Context, in *BulkRefreshRequest, opts ...grpc.CallOption) (*BulkRefreshResponse, error)
|
||||
// HealthCheck проверяет здоровье сервиса
|
||||
HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
|
||||
}
|
||||
@ -79,6 +88,36 @@ func (c *memoryServiceClient) ProcessMessage(ctx context.Context, in *ProcessMes
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoryServiceClient) GetRelevantMemories(ctx context.Context, in *GetRelevantMemoriesRequest, opts ...grpc.CallOption) (*GetRelevantMemoriesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetRelevantMemoriesResponse)
|
||||
err := c.cc.Invoke(ctx, MemoryService_GetRelevantMemories_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoryServiceClient) GetMemoriesByUser(ctx context.Context, in *GetMemoriesByUserRequest, opts ...grpc.CallOption) (*GetMemoriesByUserResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetMemoriesByUserResponse)
|
||||
err := c.cc.Invoke(ctx, MemoryService_GetMemoriesByUser_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoryServiceClient) BulkRefresh(ctx context.Context, in *BulkRefreshRequest, opts ...grpc.CallOption) (*BulkRefreshResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(BulkRefreshResponse)
|
||||
err := c.cc.Invoke(ctx, MemoryService_BulkRefresh_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memoryServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(HealthCheckResponse)
|
||||
@ -101,6 +140,12 @@ type MemoryServiceServer interface {
|
||||
GetMemories(context.Context, *GetMemoriesRequest) (*GetMemoriesResponse, error)
|
||||
// ProcessMessage обрабатывает сообщение и извлекает факты
|
||||
ProcessMessage(context.Context, *ProcessMessageRequest) (*ProcessMessageResponse, error)
|
||||
// GetRelevantMemories получает релевантные воспоминания для текущего сообщения
|
||||
GetRelevantMemories(context.Context, *GetRelevantMemoriesRequest) (*GetRelevantMemoriesResponse, error)
|
||||
// GetMemoriesByUser получает все воспоминания пользователя
|
||||
GetMemoriesByUser(context.Context, *GetMemoriesByUserRequest) (*GetMemoriesByUserResponse, error)
|
||||
// BulkRefresh обрабатывает множество сообщений для извлечения фактов
|
||||
BulkRefresh(context.Context, *BulkRefreshRequest) (*BulkRefreshResponse, error)
|
||||
// HealthCheck проверяет здоровье сервиса
|
||||
HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
|
||||
mustEmbedUnimplementedMemoryServiceServer()
|
||||
@ -122,6 +167,15 @@ func (UnimplementedMemoryServiceServer) GetMemories(context.Context, *GetMemorie
|
||||
func (UnimplementedMemoryServiceServer) ProcessMessage(context.Context, *ProcessMessageRequest) (*ProcessMessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ProcessMessage not implemented")
|
||||
}
|
||||
func (UnimplementedMemoryServiceServer) GetRelevantMemories(context.Context, *GetRelevantMemoriesRequest) (*GetRelevantMemoriesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetRelevantMemories not implemented")
|
||||
}
|
||||
func (UnimplementedMemoryServiceServer) GetMemoriesByUser(context.Context, *GetMemoriesByUserRequest) (*GetMemoriesByUserResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetMemoriesByUser not implemented")
|
||||
}
|
||||
func (UnimplementedMemoryServiceServer) BulkRefresh(context.Context, *BulkRefreshRequest) (*BulkRefreshResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method BulkRefresh not implemented")
|
||||
}
|
||||
func (UnimplementedMemoryServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")
|
||||
}
|
||||
@ -200,6 +254,60 @@ func _MemoryService_ProcessMessage_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoryService_GetRelevantMemories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRelevantMemoriesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemoryServiceServer).GetRelevantMemories(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: MemoryService_GetRelevantMemories_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemoryServiceServer).GetRelevantMemories(ctx, req.(*GetRelevantMemoriesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoryService_GetMemoriesByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMemoriesByUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemoryServiceServer).GetMemoriesByUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: MemoryService_GetMemoriesByUser_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemoryServiceServer).GetMemoriesByUser(ctx, req.(*GetMemoriesByUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoryService_BulkRefresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BulkRefreshRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MemoryServiceServer).BulkRefresh(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: MemoryService_BulkRefresh_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemoryServiceServer).BulkRefresh(ctx, req.(*BulkRefreshRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MemoryService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(HealthCheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -237,6 +345,18 @@ var MemoryService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ProcessMessage",
|
||||
Handler: _MemoryService_ProcessMessage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetRelevantMemories",
|
||||
Handler: _MemoryService_GetRelevantMemories_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMemoriesByUser",
|
||||
Handler: _MemoryService_GetMemoriesByUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BulkRefresh",
|
||||
Handler: _MemoryService_BulkRefresh_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "HealthCheck",
|
||||
Handler: _MemoryService_HealthCheck_Handler,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user