Skip to content

Commit

Permalink
chore(examples): minor formatting changes (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Aug 12, 2024
1 parent 925a930 commit 8e6b615
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion tests/api-resources/beta/assistants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('resource assistants', () => {
file_search: {
vector_store_ids: ['string'],
vector_stores: [
{ file_ids: ['string', 'string', 'string'], chunking_strategy: { type: 'auto' }, metadata: {} },
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
],
},
},
Expand Down
12 changes: 6 additions & 6 deletions tests/api-resources/beta/threads/runs/runs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ describe('resource runs', () => {
additional_instructions: 'additional_instructions',
additional_messages: [
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -57,8 +57,8 @@ describe('resource runs', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -88,8 +88,8 @@ describe('resource runs', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -227,9 +227,9 @@ describe('resource runs', () => {
test('submitToolOutputs: required and optional params', async () => {
const response = await client.beta.threads.runs.submitToolOutputs('thread_id', 'run_id', {
tool_outputs: [
{ tool_call_id: 'tool_call_id', output: 'output' },
{ tool_call_id: 'tool_call_id', output: 'output' },
{ tool_call_id: 'tool_call_id', output: 'output' },
{ output: 'output', tool_call_id: 'tool_call_id' },
{ output: 'output', tool_call_id: 'tool_call_id' },
{ output: 'output', tool_call_id: 'tool_call_id' },
],
stream: false,
});
Expand Down
18 changes: 9 additions & 9 deletions tests/api-resources/beta/threads/threads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe('resource threads', () => {
{
messages: [
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -65,8 +65,8 @@ describe('resource threads', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -96,8 +96,8 @@ describe('resource threads', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -134,8 +134,8 @@ describe('resource threads', () => {
vector_store_ids: ['string'],
vector_stores: [
{
file_ids: ['string', 'string', 'string'],
chunking_strategy: { type: 'auto' },
file_ids: ['string', 'string', 'string'],
metadata: {},
},
],
Expand Down Expand Up @@ -220,8 +220,8 @@ describe('resource threads', () => {
thread: {
messages: [
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -251,8 +251,8 @@ describe('resource threads', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -282,8 +282,8 @@ describe('resource threads', () => {
metadata: {},
},
{
role: 'user',
content: 'string',
role: 'user',
attachments: [
{
file_id: 'file_id',
Expand Down Expand Up @@ -313,16 +313,16 @@ describe('resource threads', () => {
metadata: {},
},
],
metadata: {},
tool_resources: {
code_interpreter: { file_ids: ['string', 'string', 'string'] },
file_search: {
vector_store_ids: ['string'],
vector_stores: [
{ file_ids: ['string', 'string', 'string'], chunking_strategy: { type: 'auto' }, metadata: {} },
{ chunking_strategy: { type: 'auto' }, file_ids: ['string', 'string', 'string'], metadata: {} },
],
},
},
metadata: {},
},
tool_choice: 'none',
tool_resources: {
Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('resource completions', () => {
model: 'gpt-4o',
frequency_penalty: -2,
function_call: 'none',
functions: [{ description: 'description', name: 'name', parameters: { foo: 'bar' } }],
functions: [{ name: 'name', description: 'description', parameters: { foo: 'bar' } }],
logit_bias: { foo: 0 },
logprobs: true,
max_tokens: 0,
Expand All @@ -46,16 +46,16 @@ describe('resource completions', () => {
tool_choice: 'none',
tools: [
{
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
type: 'function',
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
},
{
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
type: 'function',
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
},
{
function: { name: 'name', description: 'description', parameters: { foo: 'bar' }, strict: true },
type: 'function',
function: { description: 'description', name: 'name', parameters: { foo: 'bar' }, strict: true },
},
],
top_logprobs: 0,
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/fine-tuning/jobs/jobs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ describe('resource jobs', () => {
type: 'wandb',
wandb: {
project: 'my-wandb-project',
name: 'name',
entity: 'entity',
name: 'name',
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
},
},
{
type: 'wandb',
wandb: {
project: 'my-wandb-project',
name: 'name',
entity: 'entity',
name: 'name',
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
},
},
{
type: 'wandb',
wandb: {
project: 'my-wandb-project',
name: 'name',
entity: 'entity',
name: 'name',
tags: ['custom-tag', 'custom-tag', 'custom-tag'],
},
},
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/images.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('resource images', () => {
model: 'dall-e-2',
n: 1,
response_format: 'url',
size: '1024x1024',
size: '256x256',
user: 'user-1234',
});
});
Expand All @@ -55,7 +55,7 @@ describe('resource images', () => {
model: 'dall-e-2',
n: 1,
response_format: 'url',
size: '1024x1024',
size: '256x256',
user: 'user-1234',
});
});
Expand All @@ -78,7 +78,7 @@ describe('resource images', () => {
n: 1,
quality: 'standard',
response_format: 'url',
size: '1024x1024',
size: '256x256',
style: 'vivid',
user: 'user-1234',
});
Expand Down

0 comments on commit 8e6b615

Please sign in to comment.