smgc commited on
Commit
6303aa3
·
verified ·
1 Parent(s): eea5056

Create protos/VertexInferenceService.proto

Browse files
Files changed (1) hide show
  1. protos/VertexInferenceService.proto +39 -0
protos/VertexInferenceService.proto ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ syntax = "proto3"; // 使用Protobuf版本3
2
+
3
+ package runtime.aot.machine_learning.parents.vertex;
4
+
5
+ service VertexInferenceService {
6
+ rpc Predict (Requests) returns (Response);
7
+ rpc PredictWithStream (Requests) returns (stream Response);
8
+ }
9
+ //Global
10
+ message Messages{
11
+ int64 unknown = 1; // 也许只是常量1(请求)/3(回应)
12
+ string message = 2; // 消息
13
+ }
14
+
15
+ // Requests
16
+ message Requests {
17
+ string models = 1; // 模型名称
18
+ Args args = 2;
19
+ }
20
+
21
+ message Args {
22
+ reserved 1;
23
+ Messages messages = 2; // 消息,可以视作user
24
+ string rules = 3; // 规则,可以视作system
25
+ }
26
+
27
+ // Response
28
+ message Response {
29
+ int64 response_code = 2; // 返回状态码,200,439等
30
+ Args1 args = 4;
31
+ }
32
+
33
+ message Args1{
34
+ Args2 args = 1; // 不知道什么意义的套一层
35
+ }
36
+
37
+ message Args2{
38
+ Messages args = 2; // 不知道什么意义的套一层
39
+ }