WIP on persisting chat history on daemon

This commit is contained in:
2026-02-08 22:04:33 +02:00
parent 16ab8e4207
commit e878b8120b
15 changed files with 881 additions and 28 deletions

View File

@@ -2,13 +2,37 @@ syntax = "proto3";
package ai_daemon;
service AiDaemon {
rpc Prompt (PromptRequest) returns (PromptResponse);
rpc Prompt(PromptRequest) returns (PromptResponse);
rpc Chat(ChatRequest) returns (ChatResponse);
rpc ChatHistory(ChatHistoryRequest) returns (ChatHistoryResponse);
}
message ChatResponse {
int64 id = 1;
int64 chat_id = 2;
string text = 10;
bool is_user = 20;
}
message ChatRequest {
optional int64 chat_id = 1;
optional string text = 10;
}
message ChatHistoryRequest {
// If not set last chat is returned
optional int64 chat_id = 1;
}
message ChatHistoryResponse {
int64 chat_id = 1;
repeated ChatResponse history = 10;
}
message PromptRequest {
string prompt = 1;
string prompt = 1;
}
message PromptResponse {
string response = 1;
string response = 1;
}