Files
ws-agent/crates/shared/proto/api.proto

39 lines
710 B
Protocol Buffer

syntax = "proto3";
package ai_daemon;
service AiDaemon {
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;
}
message PromptResponse {
string response = 1;
}