Skip to content

Commit

Permalink
chore(internal): spec update (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Nov 18, 2024
1 parent 70a441c commit ad0dc7d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 346 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2f8ca92b9b1879fd535b685e4767338413fcd533d42f3baac13a9c41da3fce35.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-fb9db2d2c1f0d6b39d8ee042db5d5c59acba6ad1daf47c18792c1f5fb24b3401.yml
2 changes: 1 addition & 1 deletion tests/api-resources/audio/transcriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('resource transcriptions', () => {
prompt: 'prompt',
response_format: 'json',
temperature: 0,
timestamp_granularities: ['word', 'segment'],
timestamp_granularities: ['word'],
});
});
});
8 changes: 3 additions & 5 deletions tests/api-resources/beta/assistants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ describe('resource assistants', () => {
response_format: 'auto',
temperature: 1,
tool_resources: {
code_interpreter: { file_ids: ['string', 'string', 'string'] },
code_interpreter: { file_ids: ['string'] },
file_search: {
vector_store_ids: ['string'],
vector_stores: [
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
],
vector_stores: [{ chunking_strategy: { type: 'auto' }, file_ids: ['string'], metadata: {} }],
},
},
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
tools: [{ type: 'code_interpreter' }],
top_p: 1,
});
});
Expand Down
15 changes: 1 addition & 14 deletions tests/api-resources/beta/threads/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,7 @@ describe('resource messages', () => {
const response = await client.beta.threads.messages.create('thread_id', {
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
},
{
file_id: 'file_id',
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
},
{
file_id: 'file_id',
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
},
],
attachments: [{ file_id: 'file_id', tools: [{ type: 'code_interpreter' }] }],
metadata: {},
});
});
Expand Down
99 changes: 4 additions & 95 deletions tests/api-resources/beta/threads/runs/runs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,94 +29,7 @@ describe('resource runs', () => {
{
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
],
metadata: {},
},
{
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
],
metadata: {},
},
{
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
{
file_id: 'file_id',
tools: [
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
{ type: 'code_interpreter' },
],
},
],
attachments: [{ file_id: 'file_id', tools: [{ type: 'code_interpreter' }] }],
metadata: {},
},
],
Expand All @@ -130,7 +43,7 @@ describe('resource runs', () => {
stream: false,
temperature: 1,
tool_choice: 'none',
tools: [{ type: 'code_interpreter' }, { type: 'code_interpreter' }, { type: 'code_interpreter' }],
tools: [{ type: 'code_interpreter' }],
top_p: 1,
truncation_strategy: { type: 'auto', last_messages: 1 },
});
Expand Down Expand Up @@ -214,7 +127,7 @@ describe('resource runs', () => {

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

test('submitToolOutputs: required and optional params', async () => {
const response = await client.beta.threads.runs.submitToolOutputs('thread_id', 'run_id', {
tool_outputs: [
{ output: 'output', tool_call_id: 'tool_call_id' },
{ output: 'output', tool_call_id: 'tool_call_id' },
{ output: 'output', tool_call_id: 'tool_call_id' },
],
tool_outputs: [{ output: 'output', tool_call_id: 'tool_call_id' }],
stream: false,
});
});
Expand Down
Loading

0 comments on commit ad0dc7d

Please sign in to comment.