暂存

tmp
This commit is contained in:
2024-05-09 16:35:21 +08:00
parent 3afa0d81bb
commit bcc1b51006
27 changed files with 1526 additions and 0 deletions

41
proto/msw.proto Normal file
View File

@@ -0,0 +1,41 @@
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; }