Skip to content

Commit 09ff437

Browse files
chore(examples): minor formatting changes (#987)
1 parent 36386b0 commit 09ff437

File tree

6 files changed

+26
-26
lines changed

6 files changed

+26
-26
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('resource assistants', () => {
3434
file_search: {
3535
vector_store_ids: ['string'],
3636
vector_stores: [
37-
{ file_ids: ['string', 'string', 'string'], chunking_strategy: { type: 'auto' }, metadata: {} },
37+
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
3838
],
3939
},
4040
},

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ describe('resource runs', () => {
2626
additional_instructions: 'additional_instructions',
2727
additional_messages: [
2828
{
29-
role: 'user',
3029
content: 'string',
30+
role: 'user',
3131
attachments: [
3232
{
3333
file_id: 'file_id',
@@ -57,8 +57,8 @@ describe('resource runs', () => {
5757
metadata: {},
5858
},
5959
{
60-
role: 'user',
6160
content: 'string',
61+
role: 'user',
6262
attachments: [
6363
{
6464
file_id: 'file_id',
@@ -88,8 +88,8 @@ describe('resource runs', () => {
8888
metadata: {},
8989
},
9090
{
91-
role: 'user',
9291
content: 'string',
92+
role: 'user',
9393
attachments: [
9494
{
9595
file_id: 'file_id',
@@ -227,9 +227,9 @@ describe('resource runs', () => {
227227
test('submitToolOutputs: required and optional params', async () => {
228228
const response = await client.beta.threads.runs.submitToolOutputs('thread_id', 'run_id', {
229229
tool_outputs: [
230-
{ tool_call_id: 'tool_call_id', output: 'output' },
231-
{ tool_call_id: 'tool_call_id', output: 'output' },
232-
{ tool_call_id: 'tool_call_id', output: 'output' },
230+
{ output: 'output', tool_call_id: 'tool_call_id' },
231+
{ output: 'output', tool_call_id: 'tool_call_id' },
232+
{ output: 'output', tool_call_id: 'tool_call_id' },
233233
],
234234
stream: false,
235235
});

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe('resource threads', () => {
3434
{
3535
messages: [
3636
{
37-
role: 'user',
3837
content: 'string',
38+
role: 'user',
3939
attachments: [
4040
{
4141
file_id: 'file_id',
@@ -65,8 +65,8 @@ describe('resource threads', () => {
6565
metadata: {},
6666
},
6767
{
68-
role: 'user',
6968
content: 'string',
69+
role: 'user',
7070
attachments: [
7171
{
7272
file_id: 'file_id',
@@ -96,8 +96,8 @@ describe('resource threads', () => {
9696
metadata: {},
9797
},
9898
{
99-
role: 'user',
10099
content: 'string',
100+
role: 'user',
101101
attachments: [
102102
{
103103
file_id: 'file_id',
@@ -134,8 +134,8 @@ describe('resource threads', () => {
134134
vector_store_ids: ['string'],
135135
vector_stores: [
136136
{
137-
file_ids: ['string', 'string', 'string'],
138137
chunking_strategy: { type: 'auto' },
138+
file_ids: ['string', 'string', 'string'],
139139
metadata: {},
140140
},
141141
],
@@ -220,8 +220,8 @@ describe('resource threads', () => {
220220
thread: {
221221
messages: [
222222
{
223-
role: 'user',
224223
content: 'string',
224+
role: 'user',
225225
attachments: [
226226
{
227227
file_id: 'file_id',
@@ -251,8 +251,8 @@ describe('resource threads', () => {
251251
metadata: {},
252252
},
253253
{
254-
role: 'user',
255254
content: 'string',
255+
role: 'user',
256256
attachments: [
257257
{
258258
file_id: 'file_id',
@@ -282,8 +282,8 @@ describe('resource threads', () => {
282282
metadata: {},
283283
},
284284
{
285-
role: 'user',
286285
content: 'string',
286+
role: 'user',
287287
attachments: [
288288
{
289289
file_id: 'file_id',
@@ -313,16 +313,16 @@ describe('resource threads', () => {
313313
metadata: {},
314314
},
315315
],
316+
metadata: {},
316317
tool_resources: {
317318
code_interpreter: { file_ids: ['string', 'string', 'string'] },
318319
file_search: {
319320
vector_store_ids: ['string'],
320321
vector_stores: [
321-
{ file_ids: ['string', 'string', 'string'], chunking_strategy: { type: 'auto' }, metadata: {} },
322+
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
322323
],
323324
},
324325
},
325-
metadata: {},
326326
},
327327
tool_choice: 'none',
328328
tool_resources: {

tests/api-resources/chat/completions.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('resource completions', () => {
2929
model: 'gpt-4o',
3030
frequency_penalty: -2,
3131
function_call: 'none',
32-
functions: [{ description: 'description', name: 'name', parameters: { foo: 'bar' } }],
32+
functions: [{ name: 'name', description: 'description', parameters: { foo: 'bar' } }],
3333
logit_bias: { foo: 0 },
3434
logprobs: true,
3535
max_tokens: 0,
@@ -46,16 +46,16 @@ describe('resource completions', () => {
4646
tool_choice: 'none',
4747
tools: [
4848
{
49+
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
4950
type: 'function',
50-
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
5151
},
5252
{
53+
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
5354
type: 'function',
54-
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
5555
},
5656
{
57+
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
5758
type: 'function',
58-
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
5959
},
6060
],
6161
top_logprobs: 0,

tests/api-resources/fine-tuning/jobs/jobs.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@ describe('resource jobs', () => {
3333
type: 'wandb',
3434
wandb: {
3535
project: 'my-wandb-project',
36-
name: 'name',
3736
entity: 'entity',
37+
name: 'name',
3838
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
3939
},
4040
},
4141
{
4242
type: 'wandb',
4343
wandb: {
4444
project: 'my-wandb-project',
45-
name: 'name',
4645
entity: 'entity',
46+
name: 'name',
4747
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
4848
},
4949
},
5050
{
5151
type: 'wandb',
5252
wandb: {
5353
project: 'my-wandb-project',
54-
name: 'name',
5554
entity: 'entity',
55+
name: 'name',
5656
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
5757
},
5858
},

tests/api-resources/images.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('resource images', () => {
2828
model: 'dall-e-2',
2929
n: 1,
3030
response_format: 'url',
31-
size: '1024x1024',
31+
size: '256x256',
3232
user: 'user-1234',
3333
});
3434
});
@@ -55,7 +55,7 @@ describe('resource images', () => {
5555
model: 'dall-e-2',
5656
n: 1,
5757
response_format: 'url',
58-
size: '1024x1024',
58+
size: '256x256',
5959
user: 'user-1234',
6060
});
6161
});
@@ -78,7 +78,7 @@ describe('resource images', () => {
7878
n: 1,
7979
quality: 'standard',
8080
response_format: 'url',
81-
size: '1024x1024',
81+
size: '256x256',
8282
style: 'vivid',
8383
user: 'user-1234',
8484
});

0 commit comments

Comments
 (0)