Skip to content

Commit fe3f1bc

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: rebuild project due to codegen change (#11)
1 parent 6050424 commit fe3f1bc

File tree

7 files changed

+14
-147
lines changed

7 files changed

+14
-147
lines changed

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

Lines changed: 1 addition & 1 deletion
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/chat.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ describe('resource chat', () => {
5050
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
5151
type: 'function',
5252
},
53-
{
54-
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
55-
type: 'function',
56-
},
57-
{
58-
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
59-
type: 'function',
60-
},
6153
],
6254
top_logprobs: 0,
6355
top_p: 1,

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,7 @@ describe('resource jobs', () => {
3131
integrations: [
3232
{
3333
type: 'wandb',
34-
wandb: {
35-
project: 'my-wandb-project',
36-
entity: 'entity',
37-
name: 'name',
38-
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
39-
},
40-
},
41-
{
42-
type: 'wandb',
43-
wandb: {
44-
project: 'my-wandb-project',
45-
entity: 'entity',
46-
name: 'name',
47-
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
48-
},
49-
},
50-
{
51-
type: 'wandb',
52-
wandb: {
53-
project: 'my-wandb-project',
54-
entity: 'entity',
55-
name: 'name',
56-
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
57-
},
34+
wandb: { project: 'my-wandb-project', entity: 'entity', name: 'name', tags: ['custom-tag'] },
5835
},
5936
],
6037
seed: 42,

tests/api-resources/organization/audit-logs.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ describe('resource auditLogs', () => {
3232
await expect(
3333
client.organization.auditLogs.list(
3434
{
35-
actor_emails: ['string', 'string', 'string'],
36-
actor_ids: ['string', 'string', 'string'],
35+
actor_emails: ['string'],
36+
actor_ids: ['string'],
3737
after: 'after',
3838
before: 'before',
3939
effective_at: { gt: 0, gte: 0, lt: 0, lte: 0 },
40-
event_types: ['api_key.created', 'api_key.updated', 'api_key.deleted'],
40+
event_types: ['api_key.created'],
4141
limit: 0,
42-
project_ids: ['string', 'string', 'string'],
43-
resource_ids: ['string', 'string', 'string'],
42+
project_ids: ['string'],
43+
resource_ids: ['string'],
4444
},
4545
{ path: '/_stainless_unknown_path' },
4646
),

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('resource runs', () => {
8787

8888
test('submitToolOutputs: only required params', async () => {
8989
const responsePromise = client.threads.runs.submitToolOutputs('thread_id', 'run_id', {
90-
tool_outputs: [{}, {}, {}],
90+
tool_outputs: [{}],
9191
});
9292
const rawResponse = await responsePromise.asResponse();
9393
expect(rawResponse).toBeInstanceOf(Response);
@@ -100,11 +100,7 @@ describe('resource runs', () => {
100100

101101
test('submitToolOutputs: required and optional params', async () => {
102102
const response = await client.threads.runs.submitToolOutputs('thread_id', 'run_id', {
103-
tool_outputs: [
104-
{ output: 'output', tool_call_id: 'tool_call_id' },
105-
{ output: 'output', tool_call_id: 'tool_call_id' },
106-
{ output: 'output', tool_call_id: 'tool_call_id' },
107-
],
103+
tool_outputs: [{ output: 'output', tool_call_id: 'tool_call_id' }],
108104
stream: true,
109105
});
110106
});

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

Lines changed: 3 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -36,109 +36,16 @@ describe('resource threads', () => {
3636
{
3737
content: 'string',
3838
role: 'user',
39-
attachments: [
40-
{
41-
file_id: 'file_id',
42-
tools: [
43-
{ type: 'code_interpreter' },
44-
{ type: 'code_interpreter' },
45-
{ type: 'code_interpreter' },
46-
],
47-
},
48-
{
49-
file_id: 'file_id',
50-
tools: [
51-
{ type: 'code_interpreter' },
52-
{ type: 'code_interpreter' },
53-
{ type: 'code_interpreter' },
54-
],
55-
},
56-
{
57-
file_id: 'file_id',
58-
tools: [
59-
{ type: 'code_interpreter' },
60-
{ type: 'code_interpreter' },
61-
{ type: 'code_interpreter' },
62-
],
63-
},
64-
],
65-
metadata: {},
66-
},
67-
{
68-
content: 'string',
69-
role: 'user',
70-
attachments: [
71-
{
72-
file_id: 'file_id',
73-
tools: [
74-
{ type: 'code_interpreter' },
75-
{ type: 'code_interpreter' },
76-
{ type: 'code_interpreter' },
77-
],
78-
},
79-
{
80-
file_id: 'file_id',
81-
tools: [
82-
{ type: 'code_interpreter' },
83-
{ type: 'code_interpreter' },
84-
{ type: 'code_interpreter' },
85-
],
86-
},
87-
{
88-
file_id: 'file_id',
89-
tools: [
90-
{ type: 'code_interpreter' },
91-
{ type: 'code_interpreter' },
92-
{ type: 'code_interpreter' },
93-
],
94-
},
95-
],
96-
metadata: {},
97-
},
98-
{
99-
content: 'string',
100-
role: 'user',
101-
attachments: [
102-
{
103-
file_id: 'file_id',
104-
tools: [
105-
{ type: 'code_interpreter' },
106-
{ type: 'code_interpreter' },
107-
{ type: 'code_interpreter' },
108-
],
109-
},
110-
{
111-
file_id: 'file_id',
112-
tools: [
113-
{ type: 'code_interpreter' },
114-
{ type: 'code_interpreter' },
115-
{ type: 'code_interpreter' },
116-
],
117-
},
118-
{
119-
file_id: 'file_id',
120-
tools: [
121-
{ type: 'code_interpreter' },
122-
{ type: 'code_interpreter' },
123-
{ type: 'code_interpreter' },
124-
],
125-
},
126-
],
39+
attachments: [{ file_id: 'file_id', tools: [{ type: 'code_interpreter' }] }],
12740
metadata: {},
12841
},
12942
],
13043
metadata: {},
13144
tool_resources: {
132-
code_interpreter: { file_ids: ['string', 'string', 'string'] },
45+
code_interpreter: { file_ids: ['string'] },
13346
file_search: {
13447
vector_store_ids: ['string'],
135-
vector_stores: [
136-
{
137-
chunking_strategy: { type: 'auto' },
138-
file_ids: ['string', 'string', 'string'],
139-
metadata: {},
140-
},
141-
],
48+
vector_stores: [{ chunking_strategy: { type: 'auto' }, file_ids: ['string'], metadata: {} }],
14249
},
14350
},
14451
},

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ describe('resource uploads', () => {
5353
});
5454

5555
test('complete: only required params', async () => {
56-
const responsePromise = client.uploads.complete('upload_abc123', {
57-
part_ids: ['string', 'string', 'string'],
58-
});
56+
const responsePromise = client.uploads.complete('upload_abc123', { part_ids: ['string'] });
5957
const rawResponse = await responsePromise.asResponse();
6058
expect(rawResponse).toBeInstanceOf(Response);
6159
const response = await responsePromise;
@@ -66,9 +64,6 @@ describe('resource uploads', () => {
6664
});
6765

6866
test('complete: required and optional params', async () => {
69-
const response = await client.uploads.complete('upload_abc123', {
70-
part_ids: ['string', 'string', 'string'],
71-
md5: 'md5',
72-
});
67+
const response = await client.uploads.complete('upload_abc123', { part_ids: ['string'], md5: 'md5' });
7368
});
7469
});

0 commit comments

Comments
 (0)