Skip to content

Commit c7e9581

Browse files
feat: add support for /responses background parameter
1 parent 319853e commit c7e9581

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 108
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bffd917aa2197580fd7c0a210643e586c4a9658086c7f6559657ea35bd07f855.yml
3-
openapi_spec_hash: cd0e3133ee5fe5b0d6f4fa071cd44cc8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-373eb8eb3cc02e6f8a9fa33079a5e735886fbf62958ee83e3cdef7bb4c41be37.yml
3+
openapi_spec_hash: fe1fa50161da4f095d128b0de7787e96
44
config_hash: 6aa61d4143c3e3df785972c0287d1370

src/resources/responses/responses.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export interface ResponseObject {
104104

105105
store: boolean;
106106

107+
background?: boolean;
108+
107109
completed_at?: number | null;
108110

109111
/**
@@ -2488,6 +2490,8 @@ export interface ResponseListResponse {
24882490

24892491
store: boolean;
24902492

2493+
background?: boolean;
2494+
24912495
completed_at?: number | null;
24922496

24932497
/**
@@ -3780,6 +3784,12 @@ export interface ResponseCreateParamsBase {
37803784
*/
37813785
model: string;
37823786

3787+
/**
3788+
* Whether to run the model response in the background. When true, returns
3789+
* immediately with status 'queued'.
3790+
*/
3791+
background?: boolean;
3792+
37833793
/**
37843794
* Optional ID of a conversation to add the response to.
37853795
*/

tests/api-resources/responses/responses.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ describe('resource responses', () => {
2727
const response = await client.responses.create({
2828
input: 'string',
2929
model: 'model',
30+
background: true,
3031
conversation: 'conversation',
3132
guardrails: ['string'],
3233
include: ['web_search_call.action.sources'],

0 commit comments

Comments
 (0)