@@ -155,6 +155,11 @@ pub struct CreateResponse {
155
155
/// performance characteristics, and price points.
156
156
pub model : String ,
157
157
158
+ /// Whether to run the model response in the background.
159
+ /// boolean or null.
160
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
161
+ pub background : Option < bool > ,
162
+
158
163
/// Specify additional output data to include in the model response.
159
164
///
160
165
/// Supported values:
@@ -188,6 +193,11 @@ pub struct CreateResponse {
188
193
#[ serde( skip_serializing_if = "Option::is_none" ) ]
189
194
pub max_output_tokens : Option < u32 > ,
190
195
196
+ /// The maximum number of total calls to built-in tools that can be processed in a response.
197
+ /// This maximum number applies across all built-in tool calls, not per individual tool.
198
+ /// Any further attempts to call a tool by the model will be ignored.
199
+ pub max_tool_calls : Option < u32 > ,
200
+
191
201
/// Set of 16 key-value pairs that can be attached to an object. This can be
192
202
/// useful for storing additional information about the object in a structured
193
203
/// format, and querying for objects via API or the dashboard.
@@ -206,6 +216,10 @@ pub struct CreateResponse {
206
216
#[ serde( skip_serializing_if = "Option::is_none" ) ]
207
217
pub previous_response_id : Option < String > ,
208
218
219
+ /// Reference to a prompt template and its variables.
220
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
221
+ pub prompt : Option < PromptConfig > ,
222
+
209
223
/// **o-series models only**: Configuration options for reasoning models.
210
224
#[ serde( skip_serializing_if = "Option::is_none" ) ]
211
225
pub reasoning : Option < ReasoningConfig > ,
@@ -236,6 +250,11 @@ pub struct CreateResponse {
236
250
#[ serde( skip_serializing_if = "Option::is_none" ) ]
237
251
pub store : Option < bool > ,
238
252
253
+ /// If set to true, the model response data will be streamed to the client as it is
254
+ /// generated using server-sent events.
255
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
256
+ pub stream : Option < bool > ,
257
+
239
258
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8
240
259
/// will make the output more random, while lower values like 0.2 will make it
241
260
/// more focused and deterministic. We generally recommend altering this or
@@ -259,6 +278,11 @@ pub struct CreateResponse {
259
278
#[ serde( skip_serializing_if = "Option::is_none" ) ]
260
279
pub tools : Option < Vec < ToolDefinition > > ,
261
280
281
+ /// An integer between 0 and 20 specifying the number of most likely tokens to return
282
+ /// at each token position, each with an associated log probability.
283
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
284
+ pub top_logprobs : Option < u32 > , // TODO add validation of range
285
+
262
286
/// An alternative to sampling with temperature, called nucleus sampling,
263
287
/// where the model considers the results of the tokens with top_p probability
264
288
/// mass. So 0.1 means only the tokens comprising the top 10% probability mass
@@ -279,6 +303,23 @@ pub struct CreateResponse {
279
303
pub user : Option < String > ,
280
304
}
281
305
306
+ /// Service tier request options.
307
+ #[ derive( Debug , Serialize , Deserialize , Clone , PartialEq ) ]
308
+ pub struct PromptConfig {
309
+ /// The unique identifier of the prompt template to use.
310
+ pub id : String ,
311
+
312
+ /// Optional version of the prompt template.
313
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
314
+ pub version : Option < String > ,
315
+
316
+ /// Optional map of values to substitute in for variables in your prompt. The substitution
317
+ /// values can either be strings, or other Response input types like images or files.
318
+ /// For now only supporting Strings.
319
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
320
+ pub variables : Option < HashMap < String , String > > ,
321
+ }
322
+
282
323
/// Service tier request options.
283
324
#[ derive( Debug , Serialize , Deserialize , Clone , Copy , PartialEq ) ]
284
325
#[ serde( rename_all = "lowercase" ) ]
@@ -1323,6 +1364,12 @@ pub struct Response {
1323
1364
/// The array of content items generated by the model.
1324
1365
pub output : Vec < OutputContent > ,
1325
1366
1367
+ /// SDK-only convenience property that contains the aggregated text output from all
1368
+ /// `output_text` items in the `output` array, if any are present.
1369
+ /// Supported in the Python and JavaScript SDKs.
1370
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
1371
+ pub output_text : Option < String > ,
1372
+
1326
1373
/// Whether parallel tool calls were enabled.
1327
1374
#[ serde( skip_serializing_if = "Option::is_none" ) ]
1328
1375
pub parallel_tool_calls : Option < bool > ,
@@ -1335,6 +1382,10 @@ pub struct Response {
1335
1382
#[ serde( skip_serializing_if = "Option::is_none" ) ]
1336
1383
pub reasoning : Option < ReasoningConfig > ,
1337
1384
1385
+ /// Whether to store the generated model response for later retrieval via API.
1386
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
1387
+ pub store : Option < bool > ,
1388
+
1338
1389
/// The service tier that actually processed this response.
1339
1390
#[ serde( skip_serializing_if = "Option::is_none" ) ]
1340
1391
pub service_tier : Option < ServiceTier > ,
0 commit comments