Initial commit
This commit is contained in:
commit
da8d12f60f
95
memory.proto
Normal file
95
memory.proto
Normal file
@ -0,0 +1,95 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memory;
|
||||
|
||||
option go_package = "git.be.kaien.ru/l-ai/l-ai-memories/proto";
|
||||
|
||||
// Memory представляет воспоминание о пользователе
|
||||
message Memory {
|
||||
int64 id = 1;
|
||||
int64 user_id = 2;
|
||||
string username = 3;
|
||||
string key = 4; // Уникальный ключ факта
|
||||
string value = 5; // Значение факта
|
||||
string category = 6; // preference, fact, personality, relationship
|
||||
string priority = 7; // core, normal
|
||||
double confidence = 8; // 0.0 - 1.0
|
||||
repeated string tags = 9;
|
||||
string source = 10;
|
||||
int64 created_at = 11;
|
||||
int64 updated_at = 12;
|
||||
}
|
||||
|
||||
// StoreMemoryRequest запрос на сохранение воспоминания
|
||||
message StoreMemoryRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
string message = 3;
|
||||
string key = 4;
|
||||
string value = 5;
|
||||
string category = 6;
|
||||
string priority = 7;
|
||||
double confidence = 8;
|
||||
repeated string tags = 9;
|
||||
string source = 10;
|
||||
}
|
||||
|
||||
// StoreMemoryResponse ответ на сохранение воспоминания
|
||||
message StoreMemoryResponse {
|
||||
bool success = 1;
|
||||
string error = 2;
|
||||
int64 memory_id = 3;
|
||||
}
|
||||
|
||||
// GetMemoriesRequest запрос на получение воспоминаний
|
||||
message GetMemoriesRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
repeated string tags = 3;
|
||||
string search_query = 4;
|
||||
int32 limit = 5;
|
||||
}
|
||||
|
||||
// GetMemoriesResponse ответ с воспоминаниями
|
||||
message GetMemoriesResponse {
|
||||
repeated Memory memories = 1;
|
||||
}
|
||||
|
||||
// ProcessMessageRequest запрос на обработку сообщения для извлечения фактов
|
||||
message ProcessMessageRequest {
|
||||
int64 user_id = 1;
|
||||
string username = 2;
|
||||
string message = 3;
|
||||
string context = 4;
|
||||
}
|
||||
|
||||
// ProcessMessageResponse ответ с извлечёнными фактами
|
||||
message ProcessMessageResponse {
|
||||
bool success = 1;
|
||||
string error = 2;
|
||||
int32 facts_extracted = 3;
|
||||
}
|
||||
|
||||
// HealthCheckRequest для проверки здоровья сервиса
|
||||
message HealthCheckRequest {}
|
||||
|
||||
// HealthCheckResponse для ответа на проверку здоровья
|
||||
message HealthCheckResponse {
|
||||
bool serving = 1;
|
||||
string version = 2;
|
||||
}
|
||||
|
||||
// MemoryService - сервис для работы с памятью
|
||||
service MemoryService {
|
||||
// StoreMemory сохраняет воспоминание
|
||||
rpc StoreMemory(StoreMemoryRequest) returns (StoreMemoryResponse);
|
||||
|
||||
// GetMemories получает воспоминания пользователя
|
||||
rpc GetMemories(GetMemoriesRequest) returns (GetMemoriesResponse);
|
||||
|
||||
// ProcessMessage обрабатывает сообщение и извлекает факты
|
||||
rpc ProcessMessage(ProcessMessageRequest) returns (ProcessMessageResponse);
|
||||
|
||||
// HealthCheck проверяет здоровье сервиса
|
||||
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user