From 35f546552c433af8d518db0b44f7fcd473c02eab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:50:55 +0000 Subject: [PATCH] chore(examples): minor formatting changes (#38) --- tests/api-resources/chat/completions.test.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts index e201ac4..6de16e5 100644 --- a/tests/api-resources/chat/completions.test.ts +++ b/tests/api-resources/chat/completions.test.ts @@ -12,9 +12,9 @@ describe('resource completions', () => { test('create: only required params', async () => { const responsePromise = client.chat.completions.create({ messages: [ - { role: 'system', content: 'content' }, - { role: 'system', content: 'content' }, - { role: 'system', content: 'content' }, + { content: 'content', role: 'system' }, + { content: 'content', role: 'system' }, + { content: 'content', role: 'system' }, ], model: 'mistralai/Mixtral-8x7B-Instruct-v0.1', }); @@ -30,9 +30,9 @@ describe('resource completions', () => { test('create: required and optional params', async () => { const response = await client.chat.completions.create({ messages: [ - { role: 'system', content: 'content' }, - { role: 'system', content: 'content' }, - { role: 'system', content: 'content' }, + { content: 'content', role: 'system' }, + { content: 'content', role: 'system' }, + { content: 'content', role: 'system' }, ], model: 'mistralai/Mixtral-8x7B-Instruct-v0.1', echo: true, @@ -45,7 +45,7 @@ describe('resource completions', () => { n: 1, presence_penalty: 0, repetition_penalty: 0, - response_format: { type: 'json', schema: { foo: 'string' } }, + response_format: { schema: { foo: 'string' }, type: 'json' }, safety_model: 'safety_model_name', stop: ['string', 'string', 'string'], stream: false, @@ -53,28 +53,28 @@ describe('resource completions', () => { tool_choice: 'tool_name', tools: [ { - type: 'tool_type', function: { description: 'A description of the function.', name: 'function_name', parameters: { foo: 'bar' }, }, + type: 'tool_type', }, { - type: 'tool_type', function: { description: 'A description of the function.', name: 'function_name', parameters: { foo: 'bar' }, }, + type: 'tool_type', }, { - type: 'tool_type', function: { description: 'A description of the function.', name: 'function_name', parameters: { foo: 'bar' }, }, + type: 'tool_type', }, ], top_k: 0,