Skip to content

Commit 12f9334

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): spec update (#1195)
1 parent 8ee6c03 commit 12f9334

File tree

9 files changed

+22
-346
lines changed

9 files changed

+22
-346
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 68
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2f8ca92b9b1879fd535b685e4767338413fcd533d42f3baac13a9c41da3fce35.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-fb9db2d2c1f0d6b39d8ee042db5d5c59acba6ad1daf47c18792c1f5fb24b3401.yml

tests/api-resources/audio/transcriptions.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('resource transcriptions', () => {
3131
prompt: 'prompt',
3232
response_format: 'json',
3333
temperature: 0,
34-
timestamp_granularities: ['word', 'segment'],
34+
timestamp_granularities: ['word'],
3535
});
3636
});
3737
});

tests/api-resources/beta/assistants.test.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ describe('resource assistants', () => {
3030
response_format: 'auto',
3131
temperature: 1,
3232
tool_resources: {
33-
code_interpreter: { file_ids: ['string', 'string', 'string'] },
33+
code_interpreter: { file_ids: ['string'] },
3434
file_search: {
3535
vector_store_ids: ['string'],
36-
vector_stores: [
37-
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
38-
],
36+
vector_stores: [{ chunking_strategy: { type: 'auto' }, file_ids: ['string'], metadata: {} }],
3937
},
4038
},
41-
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
39+
tools: [{ type: 'code_interpreter' }],
4240
top_p: 1,
4341
});
4442
});

tests/api-resources/beta/threads/messages.test.ts

+1-14
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,7 @@ describe('resource messages', () => {
2727
const response = await client.beta.threads.messages.create('thread_id', {
2828
content: 'string',
2929
role: 'user',
30-
attachments: [
31-
{
32-
file_id: 'file_id',
33-
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
34-
},
35-
{
36-
file_id: 'file_id',
37-
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
38-
},
39-
{
40-
file_id: 'file_id',
41-
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
42-
},
43-
],
30+
attachments: [{ file_id: 'file_id', tools: [{ type: 'code_interpreter' }] }],
4431
metadata: {},
4532
});
4633
});

tests/api-resources/beta/threads/runs/runs.test.ts

+4-95
Original file line numberDiff line numberDiff line change
@@ -29,94 +29,7 @@ describe('resource runs', () => {
2929
{
3030
content: 'string',
3131
role: 'user',
32-
attachments: [
33-
{
34-
file_id: 'file_id',
35-
tools: [
36-
{ type: 'code_interpreter' },
37-
{ type: 'code_interpreter' },
38-
{ type: 'code_interpreter' },
39-
],
40-
},
41-
{
42-
file_id: 'file_id',
43-
tools: [
44-
{ type: 'code_interpreter' },
45-
{ type: 'code_interpreter' },
46-
{ type: 'code_interpreter' },
47-
],
48-
},
49-
{
50-
file_id: 'file_id',
51-
tools: [
52-
{ type: 'code_interpreter' },
53-
{ type: 'code_interpreter' },
54-
{ type: 'code_interpreter' },
55-
],
56-
},
57-
],
58-
metadata: {},
59-
},
60-
{
61-
content: 'string',
62-
role: 'user',
63-
attachments: [
64-
{
65-
file_id: 'file_id',
66-
tools: [
67-
{ type: 'code_interpreter' },
68-
{ type: 'code_interpreter' },
69-
{ type: 'code_interpreter' },
70-
],
71-
},
72-
{
73-
file_id: 'file_id',
74-
tools: [
75-
{ type: 'code_interpreter' },
76-
{ type: 'code_interpreter' },
77-
{ type: 'code_interpreter' },
78-
],
79-
},
80-
{
81-
file_id: 'file_id',
82-
tools: [
83-
{ type: 'code_interpreter' },
84-
{ type: 'code_interpreter' },
85-
{ type: 'code_interpreter' },
86-
],
87-
},
88-
],
89-
metadata: {},
90-
},
91-
{
92-
content: 'string',
93-
role: 'user',
94-
attachments: [
95-
{
96-
file_id: 'file_id',
97-
tools: [
98-
{ type: 'code_interpreter' },
99-
{ type: 'code_interpreter' },
100-
{ type: 'code_interpreter' },
101-
],
102-
},
103-
{
104-
file_id: 'file_id',
105-
tools: [
106-
{ type: 'code_interpreter' },
107-
{ type: 'code_interpreter' },
108-
{ type: 'code_interpreter' },
109-
],
110-
},
111-
{
112-
file_id: 'file_id',
113-
tools: [
114-
{ type: 'code_interpreter' },
115-
{ type: 'code_interpreter' },
116-
{ type: 'code_interpreter' },
117-
],
118-
},
119-
],
32+
attachments: [{ file_id: 'file_id', tools: [{ type: 'code_interpreter' }] }],
12033
metadata: {},
12134
},
12235
],
@@ -130,7 +43,7 @@ describe('resource runs', () => {
13043
stream: false,
13144
temperature: 1,
13245
tool_choice: 'none',
133-
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
46+
tools: [{ type: 'code_interpreter' }],
13447
top_p: 1,
13548
truncation_strategy: { type: 'auto', last_messages: 1 },
13649
});
@@ -214,7 +127,7 @@ describe('resource runs', () => {
214127

215128
test('submitToolOutputs: only required params', async () => {
216129
const responsePromise = client.beta.threads.runs.submitToolOutputs('thread_id', 'run_id', {
217-
tool_outputs: [{}, {}, {}],
130+
tool_outputs: [{}],
218131
});
219132
const rawResponse = await responsePromise.asResponse();
220133
expect(rawResponse).toBeInstanceOf(Response);
@@ -227,11 +140,7 @@ describe('resource runs', () => {
227140

228141
test('submitToolOutputs: required and optional params', async () => {
229142
const response = await client.beta.threads.runs.submitToolOutputs('thread_id', 'run_id', {
230-
tool_outputs: [
231-
{ output: 'output', tool_call_id: 'tool_call_id' },
232-
{ output: 'output', tool_call_id: 'tool_call_id' },
233-
{ output: 'output', tool_call_id: 'tool_call_id' },
234-
],
143+
tool_outputs: [{ output: 'output', tool_call_id: 'tool_call_id' }],
235144
stream: false,
236145
});
237146
});

0 commit comments

Comments
 (0)