-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllm.proto
More file actions
155 lines (128 loc) · 2.89 KB
/
llm.proto
File metadata and controls
155 lines (128 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
syntax = "proto3";
package llmmcp.v1;
option go_package = "llm-mcp/core/internal/pb;pb";
service Core {
rpc SubmitJob (SubmitJobRequest) returns (SubmitJobResponse);
rpc GetJob (GetJobRequest) returns (GetJobResponse);
rpc StreamJob (StreamJobRequest) returns (stream JobEvent);
rpc RegisterWorker (RegisterWorkerRequest) returns (RegisterWorkerResponse);
rpc ClaimJob (ClaimJobRequest) returns (ClaimJobResponse);
rpc Heartbeat (HeartbeatRequest) returns (HeartbeatResponse);
rpc CompleteJob (CompleteJobRequest) returns (CompleteJobResponse);
rpc FailJob (FailJobRequest) returns (FailJobResponse);
rpc ReportMetrics (ReportMetricsRequest) returns (ReportMetricsResponse);
rpc ReportBenchmark (ReportBenchmarkRequest) returns (ReportBenchmarkResponse);
}
message SubmitJobRequest {
string kind = 1;
string payload_json = 2;
int32 priority = 3;
string source = 4;
int32 max_attempts = 5;
string deadline_at = 6;
}
message SubmitJobResponse {
string job_id = 1;
}
message GetJobRequest {
string job_id = 1;
}
message GetJobResponse {
Job job = 1;
}
message StreamJobRequest {
string job_id = 1;
}
message JobEvent {
string job_id = 1;
string type = 2;
string message = 3;
string ts = 4;
string data_json = 5;
}
message RegisterWorkerRequest {
WorkerInfo worker = 1;
}
message RegisterWorkerResponse {
string worker_id = 1;
}
message ClaimJobRequest {
string worker_id = 1;
repeated string kinds = 2;
int32 lease_seconds = 3;
}
message ClaimJobResponse {
Job job = 1;
}
message HeartbeatRequest {
string worker_id = 1;
string job_id = 2;
int32 extend_seconds = 3;
}
message HeartbeatResponse {
bool ok = 1;
}
message CompleteJobRequest {
string worker_id = 1;
string job_id = 2;
string result_json = 3;
string metrics_json = 4;
}
message CompleteJobResponse {
bool ok = 1;
}
message FailJobRequest {
string worker_id = 1;
string job_id = 2;
string error = 3;
string metrics_json = 4;
}
message FailJobResponse {
bool ok = 1;
}
message ReportMetricsRequest {
WorkerInfo worker = 1;
string metrics_json = 2;
}
message ReportMetricsResponse {
bool ok = 1;
}
message ReportBenchmarkRequest {
Benchmark benchmark = 1;
}
message ReportBenchmarkResponse {
bool ok = 1;
}
message Benchmark {
string device_id = 1;
string model_id = 2;
string task_type = 3;
int32 tokens_in = 4;
int32 tokens_out = 5;
int32 latency_ms = 6;
double tps = 7;
string meta_json = 8;
}
message Job {
string id = 1;
string kind = 2;
string payload_json = 3;
string status = 4;
int32 attempts = 5;
int32 max_attempts = 6;
string lease_until = 7;
string deadline_at = 8;
string result_json = 9;
string error = 10;
int32 priority = 11;
string queued_at = 12;
string updated_at = 13;
}
message WorkerInfo {
string id = 1;
string name = 2;
string platform = 3;
string arch = 4;
string host = 5;
string tags_json = 6;
}