63 lines
1.7 KiB
Protocol Buffer
63 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package brunix;
|
|
|
|
service AssistanceEngine {
|
|
// Respuesta completa — compatible con clientes existentes
|
|
rpc AskAgent (AgentRequest) returns (stream AgentResponse);
|
|
|
|
// Streaming real token a token desde Ollama
|
|
rpc AskAgentStream (AgentRequest) returns (stream AgentResponse);
|
|
|
|
// Evaluación RAGAS con Claude como juez
|
|
rpc EvaluateRAG (EvalRequest) returns (EvalResponse);
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// AskAgent / AskAgentStream — mismos mensajes, dos comportamientos
|
|
// ---------------------------------------------------------------------------
|
|
|
|
message AgentRequest {
|
|
string query = 1;
|
|
string session_id = 2;
|
|
}
|
|
|
|
message AgentResponse {
|
|
string text = 1;
|
|
string avap_code = 2;
|
|
bool is_final = 3;
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// EvaluateRAG
|
|
// ---------------------------------------------------------------------------
|
|
|
|
message EvalRequest {
|
|
string category = 1;
|
|
int32 limit = 2;
|
|
string index = 3;
|
|
}
|
|
|
|
message EvalResponse {
|
|
string status = 1;
|
|
int32 questions_evaluated = 2;
|
|
float elapsed_seconds = 3;
|
|
string judge_model = 4;
|
|
string index = 5;
|
|
float faithfulness = 6;
|
|
float answer_relevancy = 7;
|
|
float context_recall = 8;
|
|
float context_precision = 9;
|
|
float global_score = 10;
|
|
string verdict = 11;
|
|
repeated QuestionDetail details = 12;
|
|
}
|
|
|
|
message QuestionDetail {
|
|
string id = 1;
|
|
string category = 2;
|
|
string question = 3;
|
|
string answer_preview = 4;
|
|
int32 n_chunks = 5;
|
|
}
|