initial commit
Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
This commit is contained in:
72
crates/server/src/proto/emotions.proto
Normal file
72
crates/server/src/proto/emotions.proto
Normal file
@@ -0,0 +1,72 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package emotions;
|
||||
|
||||
// Emotion classification for a message
|
||||
message Emotion {
|
||||
int64 id = 1;
|
||||
int64 message_id = 2;
|
||||
string emotion = 3;
|
||||
double confidence = 4;
|
||||
string model_version = 5;
|
||||
int64 created_at = 6;
|
||||
int64 updated_at = 7;
|
||||
}
|
||||
|
||||
// Request to get a single emotion by message ID
|
||||
message GetEmotionRequest {
|
||||
int64 message_id = 1;
|
||||
}
|
||||
|
||||
// Request to get multiple emotions with optional filters
|
||||
message GetEmotionsRequest {
|
||||
repeated int64 message_ids = 1;
|
||||
optional string emotion_filter = 2;
|
||||
optional double min_confidence = 3;
|
||||
optional int32 limit = 4;
|
||||
optional int32 offset = 5;
|
||||
}
|
||||
|
||||
// Response containing multiple emotions
|
||||
message EmotionsResponse {
|
||||
repeated Emotion emotions = 1;
|
||||
int32 total_count = 2;
|
||||
}
|
||||
|
||||
// Request to update an emotion (for corrections/fine-tuning)
|
||||
message UpdateEmotionRequest {
|
||||
int64 message_id = 1;
|
||||
string emotion = 2;
|
||||
double confidence = 3;
|
||||
optional string notes = 4;
|
||||
}
|
||||
|
||||
// Request to delete an emotion
|
||||
message DeleteEmotionRequest {
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
// Generic response for mutations
|
||||
message EmotionResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
optional Emotion emotion = 3;
|
||||
}
|
||||
|
||||
// Empty message for list all
|
||||
message Empty {}
|
||||
|
||||
// The emotion service with full CRUD operations
|
||||
service EmotionService {
|
||||
// Read operations
|
||||
rpc GetEmotion(GetEmotionRequest) returns (Emotion);
|
||||
rpc GetEmotions(GetEmotionsRequest) returns (EmotionsResponse);
|
||||
rpc ListAllEmotions(Empty) returns (EmotionsResponse);
|
||||
|
||||
// Update operations (for classification corrections and fine-tuning)
|
||||
rpc UpdateEmotion(UpdateEmotionRequest) returns (EmotionResponse);
|
||||
rpc BatchUpdateEmotions(stream UpdateEmotionRequest) returns (EmotionResponse);
|
||||
|
||||
// Delete operation
|
||||
rpc DeleteEmotion(DeleteEmotionRequest) returns (EmotionResponse);
|
||||
}
|
||||
Reference in New Issue
Block a user