l-ai-core-proto/ai.proto
2026-03-13 08:58:47 +03:00

37 lines
1.2 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package ai;
option go_package = "ai_service/proto/ai";
// AIRequest содержит запрос к AI модели
message AIRequest {
string text = 1; // Текст запроса
string bot_username = 2; // Username бота для упоминаний
}
// AIResponse содержит ответ от AI модели
message AIResponse {
string content = 1; // Текст ответа
string error = 2; // Текст ошибки, если произошла
double duration_ms = 3; // Время выполнения в миллисекундах
}
// HealthCheckRequest для проверки здоровья сервиса
message HealthCheckRequest {}
// HealthCheckResponse для ответа на проверку здоровья
message HealthCheckResponse {
bool serving = 1;
string version = 2;
}
// AIService - основной сервис для работы с AI
service AIService {
// GenerateAnswer генерирует ответ на запрос
rpc GenerateAnswer(AIRequest) returns (AIResponse);
// HealthCheck проверяет здоровье сервиса
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
}