Files
msw/proto/msw.proto
2024-05-16 15:51:06 +08:00

41 lines
945 B
Protocol Buffer

syntax = "proto3";
package msw;
import "google/protobuf/timestamp.proto";
option go_package = "msw/proto";
service MSW {
rpc Version(Empty) returns (VersionResponse) {};
rpc ClipEmbeddingForText(ClipEmbeddingForTextRequest)
returns (ClipEmbeddingResponse) {};
rpc ClipEmbeddingForImage(ClipEmbeddingForImageRequest)
returns (ClipEmbeddingResponse) {};
}
message Empty {}
message VersionResponse {
int32 major = 1;
int32 minor = 2;
int32 patch = 3;
string hostname = 4;
repeated string addr = 5;
int64 latency = 6;
google.protobuf.Timestamp started_at = 7;
}
message DataPackage {
string ToPlugin = 1;
map<string, string> Params = 2;
string Body = 3;
}
message ClipEmbeddingForTextRequest { repeated string Text = 1; }
message ClipEmbeddingForImageRequest { bytes Image = 1; }
message ClipEmbeddingResponse { repeated Embedding Embeddings = 1; }
message Embedding { repeated float Embedding = 2; }