tailly_back_v2/pkg/moderation/proto/moderation.proto
madipo2611 1a3267a4cc
All checks were successful
continuous-integration/drone/push Build is passing
v0.0.9 Интегрирован сервис модерации контента при создании поста
2025-07-22 08:28:11 +03:00

37 lines
763 B
Protocol Buffer

syntax = "proto3";
package moderation;
option go_package = ".";
service ModerationService {
rpc CheckImage (ImageRequest) returns (ModerationResponse) {}
rpc CheckVideo (VideoRequest) returns (ModerationResponse) {}
}
message ImageRequest {
bytes image_data = 1;
string image_url = 2;
}
message VideoRequest {
string video_url = 1;
int32 frame_sample_rate = 2;
}
message ModerationResponse {
string overall_decision = 1;
repeated Prediction predictions = 2;
string message = 3;
}
message Prediction {
string category = 1;
float score = 2;
string decision = 3;
}
message ModerationSettings {
map<string, float> category_thresholds = 1;
repeated string always_block_categories = 2;
repeated string always_allow_categories = 3;
}