@@ -27,15 +27,19 @@ enum DecodingMethod {
27
27
28
28
message BatchedGenerationRequest {
29
29
string model_id = 1 ;
30
+ // Deprecated in favor of adapter_id
30
31
optional string prefix_id = 2 ;
32
+ optional string adapter_id = 4 ;
31
33
repeated GenerationRequest requests = 3 ;
32
34
33
35
Parameters params = 10 ;
34
36
}
35
37
36
38
message SingleGenerationRequest {
37
39
string model_id = 1 ;
40
+ // Deprecated in favor of adapter_id
38
41
optional string prefix_id = 2 ;
42
+ optional string adapter_id = 4 ;
39
43
GenerationRequest request = 3 ;
40
44
41
45
Parameters params = 10 ;
@@ -106,6 +110,31 @@ message DecodingParameters {
106
110
// Exponentially increases the score of the EOS token
107
111
// once start_index tokens have been generated
108
112
optional LengthPenalty length_penalty = 2 ;
113
+
114
+ enum ResponseFormat {
115
+ // Plain text, no constraints
116
+ TEXT = 0 ;
117
+ // Valid json
118
+ JSON = 1 ;
119
+ }
120
+
121
+ message StringChoices {
122
+ repeated string choices = 1 ;
123
+ }
124
+
125
+ // Mutually-exclusive guided decoding options
126
+ oneof guided {
127
+ // Output will be in the specified format
128
+ ResponseFormat format = 3 ;
129
+ // Output will follow the provided JSON schema
130
+ string json_schema = 4 ;
131
+ // Output will follow the provided regex pattern
132
+ string regex = 5 ;
133
+ // Output will be exactly one of the specified choices
134
+ StringChoices choice = 6 ;
135
+ // Output will follow the provided context free grammar
136
+ string grammar = 7 ;
137
+ }
109
138
}
110
139
111
140
0 commit comments