37 lines
763 B
Protocol Buffer
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;
|
|
} |