Skip to content

Commit a100f0a

Browse files
chore(internal): fix examples (#1457)
1 parent 33b66f5 commit a100f0a

File tree

6 files changed

+10
-302
lines changed

6 files changed

+10
-302
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-472fe3036ea745365257fe870c0330917fb3153705c2826f49873cd631319b0a.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-32de3bc513663c5fac922c49be41c222b6ee8c0b841d8966bcdfa489d441daa3.yml
33
openapi_spec_hash: ea86343b5e9858a74e85da8ab2c532f6
4-
config_hash: ef19d36c307306f14f2e1cd5c834a151
4+
config_hash: d6c61213488683418adb860a9ee1501b

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('resource runs', () => {
3737
max_completion_tokens: 256,
3838
max_prompt_tokens: 256,
3939
metadata: { foo: 'string' },
40-
model: 'gpt-4o',
40+
model: 'string',
4141
parallel_tool_calls: true,
4242
reasoning_effort: 'low',
4343
response_format: 'auto',

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('resource threads', () => {
121121
max_completion_tokens: 256,
122122
max_prompt_tokens: 256,
123123
metadata: { foo: 'string' },
124-
model: 'gpt-4o',
124+
model: 'string',
125125
parallel_tool_calls: true,
126126
response_format: 'auto',
127127
stream: false,

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

+2-291
Original file line numberDiff line numberDiff line change
@@ -11,151 +11,7 @@ const client = new OpenAI({
1111
describe('resource evals', () => {
1212
test('create: only required params', async () => {
1313
const responsePromise = client.evals.create({
14-
data_source_config: {
15-
item_schema: {
16-
'0': 'bar',
17-
'1': 'bar',
18-
'2': 'bar',
19-
'3': 'bar',
20-
'4': 'bar',
21-
'5': 'bar',
22-
'6': 'bar',
23-
'7': 'bar',
24-
'8': 'bar',
25-
'9': 'bar',
26-
'10': 'bar',
27-
'11': 'bar',
28-
'12': 'bar',
29-
'13': 'bar',
30-
'14': 'bar',
31-
'15': 'bar',
32-
'16': 'bar',
33-
'17': 'bar',
34-
'18': 'bar',
35-
'19': 'bar',
36-
'20': 'bar',
37-
'21': 'bar',
38-
'22': 'bar',
39-
'23': 'bar',
40-
'24': 'bar',
41-
'25': 'bar',
42-
'26': 'bar',
43-
'27': 'bar',
44-
'28': 'bar',
45-
'29': 'bar',
46-
'30': 'bar',
47-
'31': 'bar',
48-
'32': 'bar',
49-
'33': 'bar',
50-
'34': 'bar',
51-
'35': 'bar',
52-
'36': 'bar',
53-
'37': 'bar',
54-
'38': 'bar',
55-
'39': 'bar',
56-
'40': 'bar',
57-
'41': 'bar',
58-
'42': 'bar',
59-
'43': 'bar',
60-
'44': 'bar',
61-
'45': 'bar',
62-
'46': 'bar',
63-
'47': 'bar',
64-
'48': 'bar',
65-
'49': 'bar',
66-
'50': 'bar',
67-
'51': 'bar',
68-
'52': 'bar',
69-
'53': 'bar',
70-
'54': 'bar',
71-
'55': 'bar',
72-
'56': 'bar',
73-
'57': 'bar',
74-
'58': 'bar',
75-
'59': 'bar',
76-
'60': 'bar',
77-
'61': 'bar',
78-
'62': 'bar',
79-
'63': 'bar',
80-
'64': 'bar',
81-
'65': 'bar',
82-
'66': 'bar',
83-
'67': 'bar',
84-
'68': 'bar',
85-
'69': 'bar',
86-
'70': 'bar',
87-
'71': 'bar',
88-
'72': 'bar',
89-
'73': 'bar',
90-
'74': 'bar',
91-
'75': 'bar',
92-
'76': 'bar',
93-
'77': 'bar',
94-
'78': 'bar',
95-
'79': 'bar',
96-
'80': 'bar',
97-
'81': 'bar',
98-
'82': 'bar',
99-
'83': 'bar',
100-
'84': 'bar',
101-
'85': 'bar',
102-
'86': 'bar',
103-
'87': 'bar',
104-
'88': 'bar',
105-
'89': 'bar',
106-
'90': 'bar',
107-
'91': 'bar',
108-
'92': 'bar',
109-
'93': 'bar',
110-
'94': 'bar',
111-
'95': 'bar',
112-
'96': 'bar',
113-
'97': 'bar',
114-
'98': 'bar',
115-
'99': 'bar',
116-
'100': 'bar',
117-
'101': 'bar',
118-
'102': 'bar',
119-
'103': 'bar',
120-
'104': 'bar',
121-
'105': 'bar',
122-
'106': 'bar',
123-
'107': 'bar',
124-
'108': 'bar',
125-
'109': 'bar',
126-
'110': 'bar',
127-
'111': 'bar',
128-
'112': 'bar',
129-
'113': 'bar',
130-
'114': 'bar',
131-
'115': 'bar',
132-
'116': 'bar',
133-
'117': 'bar',
134-
'118': 'bar',
135-
'119': 'bar',
136-
'120': 'bar',
137-
'121': 'bar',
138-
'122': 'bar',
139-
'123': 'bar',
140-
'124': 'bar',
141-
'125': 'bar',
142-
'126': 'bar',
143-
'127': 'bar',
144-
'128': 'bar',
145-
'129': 'bar',
146-
'130': 'bar',
147-
'131': 'bar',
148-
'132': 'bar',
149-
'133': 'bar',
150-
'134': 'bar',
151-
'135': 'bar',
152-
'136': 'bar',
153-
'137': 'bar',
154-
'138': 'bar',
155-
'139': 'bar',
156-
},
157-
type: 'custom',
158-
},
14+
data_source_config: { item_schema: { foo: 'bar' }, type: 'custom' },
15915
testing_criteria: [
16016
{
16117
input: [{ content: 'content', role: 'role' }],
@@ -178,152 +34,7 @@ describe('resource evals', () => {
17834

17935
test('create: required and optional params', async () => {
18036
const response = await client.evals.create({
181-
data_source_config: {
182-
item_schema: {
183-
'0': 'bar',
184-
'1': 'bar',
185-
'2': 'bar',
186-
'3': 'bar',
187-
'4': 'bar',
188-
'5': 'bar',
189-
'6': 'bar',
190-
'7': 'bar',
191-
'8': 'bar',
192-
'9': 'bar',
193-
'10': 'bar',
194-
'11': 'bar',
195-
'12': 'bar',
196-
'13': 'bar',
197-
'14': 'bar',
198-
'15': 'bar',
199-
'16': 'bar',
200-
'17': 'bar',
201-
'18': 'bar',
202-
'19': 'bar',
203-
'20': 'bar',
204-
'21': 'bar',
205-
'22': 'bar',
206-
'23': 'bar',
207-
'24': 'bar',
208-
'25': 'bar',
209-
'26': 'bar',
210-
'27': 'bar',
211-
'28': 'bar',
212-
'29': 'bar',
213-
'30': 'bar',
214-
'31': 'bar',
215-
'32': 'bar',
216-
'33': 'bar',
217-
'34': 'bar',
218-
'35': 'bar',
219-
'36': 'bar',
220-
'37': 'bar',
221-
'38': 'bar',
222-
'39': 'bar',
223-
'40': 'bar',
224-
'41': 'bar',
225-
'42': 'bar',
226-
'43': 'bar',
227-
'44': 'bar',
228-
'45': 'bar',
229-
'46': 'bar',
230-
'47': 'bar',
231-
'48': 'bar',
232-
'49': 'bar',
233-
'50': 'bar',
234-
'51': 'bar',
235-
'52': 'bar',
236-
'53': 'bar',
237-
'54': 'bar',
238-
'55': 'bar',
239-
'56': 'bar',
240-
'57': 'bar',
241-
'58': 'bar',
242-
'59': 'bar',
243-
'60': 'bar',
244-
'61': 'bar',
245-
'62': 'bar',
246-
'63': 'bar',
247-
'64': 'bar',
248-
'65': 'bar',
249-
'66': 'bar',
250-
'67': 'bar',
251-
'68': 'bar',
252-
'69': 'bar',
253-
'70': 'bar',
254-
'71': 'bar',
255-
'72': 'bar',
256-
'73': 'bar',
257-
'74': 'bar',
258-
'75': 'bar',
259-
'76': 'bar',
260-
'77': 'bar',
261-
'78': 'bar',
262-
'79': 'bar',
263-
'80': 'bar',
264-
'81': 'bar',
265-
'82': 'bar',
266-
'83': 'bar',
267-
'84': 'bar',
268-
'85': 'bar',
269-
'86': 'bar',
270-
'87': 'bar',
271-
'88': 'bar',
272-
'89': 'bar',
273-
'90': 'bar',
274-
'91': 'bar',
275-
'92': 'bar',
276-
'93': 'bar',
277-
'94': 'bar',
278-
'95': 'bar',
279-
'96': 'bar',
280-
'97': 'bar',
281-
'98': 'bar',
282-
'99': 'bar',
283-
'100': 'bar',
284-
'101': 'bar',
285-
'102': 'bar',
286-
'103': 'bar',
287-
'104': 'bar',
288-
'105': 'bar',
289-
'106': 'bar',
290-
'107': 'bar',
291-
'108': 'bar',
292-
'109': 'bar',
293-
'110': 'bar',
294-
'111': 'bar',
295-
'112': 'bar',
296-
'113': 'bar',
297-
'114': 'bar',
298-
'115': 'bar',
299-
'116': 'bar',
300-
'117': 'bar',
301-
'118': 'bar',
302-
'119': 'bar',
303-
'120': 'bar',
304-
'121': 'bar',
305-
'122': 'bar',
306-
'123': 'bar',
307-
'124': 'bar',
308-
'125': 'bar',
309-
'126': 'bar',
310-
'127': 'bar',
311-
'128': 'bar',
312-
'129': 'bar',
313-
'130': 'bar',
314-
'131': 'bar',
315-
'132': 'bar',
316-
'133': 'bar',
317-
'134': 'bar',
318-
'135': 'bar',
319-
'136': 'bar',
320-
'137': 'bar',
321-
'138': 'bar',
322-
'139': 'bar',
323-
},
324-
type: 'custom',
325-
include_sample_schema: true,
326-
},
37+
data_source_config: { item_schema: { foo: 'bar' }, type: 'custom', include_sample_schema: true },
32738
testing_criteria: [
32839
{
32940
input: [{ content: 'content', role: 'role' }],

tests/api-resources/images.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('resource images', () => {
2525
test('createVariation: required and optional params', async () => {
2626
const response = await client.images.createVariation({
2727
image: await toFile(Buffer.from('# my file contents'), 'README.md'),
28-
model: 'dall-e-2',
28+
model: 'string',
2929
n: 1,
3030
response_format: 'url',
3131
size: '1024x1024',
@@ -52,7 +52,7 @@ describe('resource images', () => {
5252
image: await toFile(Buffer.from('# my file contents'), 'README.md'),
5353
prompt: 'A cute baby sea otter wearing a beret',
5454
mask: await toFile(Buffer.from('# my file contents'), 'README.md'),
55-
model: 'dall-e-2',
55+
model: 'string',
5656
n: 1,
5757
response_format: 'url',
5858
size: '1024x1024',
@@ -74,7 +74,7 @@ describe('resource images', () => {
7474
test('generate: required and optional params', async () => {
7575
const response = await client.images.generate({
7676
prompt: 'A cute baby sea otter',
77-
model: 'dall-e-3',
77+
model: 'string',
7878
n: 1,
7979
quality: 'standard',
8080
response_format: 'url',

tests/api-resources/moderations.test.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ describe('resource moderations', () => {
2121
});
2222

2323
test('create: required and optional params', async () => {
24-
const response = await client.moderations.create({
25-
input: 'I want to kill them.',
26-
model: 'omni-moderation-2024-09-26',
27-
});
24+
const response = await client.moderations.create({ input: 'I want to kill them.', model: 'string' });
2825
});
2926
});

0 commit comments

Comments
 (0)