l-ai-core-proto/settings.proto
2026-07-07 17:09:40 +03:00

66 lines
2.1 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 users;
option go_package = "git.be.kaien.ru/l-ai/l-ai-core-proto/proto";
import "google/protobuf/empty.proto";
// UserSettingsService manages per-user bot settings
service UserSettingsService {
rpc GetPreferredModel(GetPreferredModelRequest) returns (GetPreferredModelResponse);
rpc SetPreferredModel(SetPreferredModelRequest) returns (google.protobuf.Empty);
// Response style: пресеты из БД или кастомный промпт пользователя
rpc ListStylePresets(ListStylePresetsRequest) returns (ListStylePresetsResponse);
rpc GetUserStyle(GetUserStyleRequest) returns (GetUserStyleResponse);
rpc SetUserStyle(SetUserStyleRequest) returns (google.protobuf.Empty);
}
message GetPreferredModelRequest {
int64 user_id = 1;
}
message GetPreferredModelResponse {
string model = 1;
}
message SetPreferredModelRequest {
int64 user_id = 1;
string username = 2;
string model = 3;
}
// StylePreset - пресет стиля ответа, хранится в БД
message StylePreset {
int64 id = 1;
string name = 2; // Отображаемое название (например "Токсик")
string prompt = 3; // Текст system prompt
}
message ListStylePresetsRequest {}
message ListStylePresetsResponse {
repeated StylePreset presets = 1;
}
message GetUserStyleRequest {
int64 user_id = 1; // Telegram user ID
}
message GetUserStyleResponse {
int64 preset_id = 1; // ID выбранного пресета (0 - не выбран)
string custom_prompt = 2; // Кастомный промпт (пустой - не задан)
}
message SetUserStyleRequest {
int64 user_id = 1; // Telegram user ID
string username = 2;
// Выбор стиля: пресет, кастомный промпт или сброс на дефолт
oneof style {
int64 preset_id = 3; // Выбрать пресет по ID
string custom_prompt = 4; // Задать свой промпт (макс 4000 символов)
bool reset = 5; // Сбросить стиль на дефолтный
}
}