Skip to content

Commit

Permalink
chore(examples): minor formatting changes (#491)
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 78e9a05 commit 8afef58
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/api-resources/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('resource messages', () => {
test('create: only required params', async () => {
const responsePromise = client.messages.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, world' }],
messages: [{ content: 'Hello, world', role: 'user' }],
model: 'claude-3-5-sonnet-20240620',
});
const rawResponse = await responsePromise.asResponse();
Expand All @@ -27,47 +27,47 @@ describe('resource messages', () => {
test('create: required and optional params', async () => {
const response = await client.messages.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, world' }],
messages: [{ content: 'Hello, world', role: 'user' }],
model: 'claude-3-5-sonnet-20240620',
metadata: { user_id: '13803d75-b4b5-4c3e-b2a2-6f21399b021b' },
stop_sequences: ['string', 'string', 'string'],
stream: false,
system: [{ type: 'text', text: "Today's date is 2024-06-01." }],
system: [{ text: "Today's date is 2024-06-01.", type: 'text' }],
temperature: 1,
tool_choice: { type: 'auto' },
tools: [
{
description: 'Get the current weather in a given location',
name: 'x',
input_schema: {
type: 'object',
properties: {
location: { description: 'The city and state, e.g. San Francisco, CA', type: 'string' },
unit: { description: 'Unit for the output - one of (celsius, fahrenheit)', type: 'string' },
},
},
name: 'x',
description: 'Get the current weather in a given location',
},
{
description: 'Get the current weather in a given location',
name: 'x',
input_schema: {
type: 'object',
properties: {
location: { description: 'The city and state, e.g. San Francisco, CA', type: 'string' },
unit: { description: 'Unit for the output - one of (celsius, fahrenheit)', type: 'string' },
},
},
name: 'x',
description: 'Get the current weather in a given location',
},
{
description: 'Get the current weather in a given location',
name: 'x',
input_schema: {
type: 'object',
properties: {
location: { description: 'The city and state, e.g. San Francisco, CA', type: 'string' },
unit: { description: 'Unit for the output - one of (celsius, fahrenheit)', type: 'string' },
},
},
name: 'x',
description: 'Get the current weather in a given location',
},
],
top_k: 5,
Expand Down

0 comments on commit 8afef58

Please sign in to comment.