diff --git a/.stats.yml b/.stats.yml index 660e6d2d..68c3aa80 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 2 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-4f6df1026ffeed840bbfada906ac51144508d1e1b099084c593aa9bac97a3362.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-70873642f89316fbc45ceaccd3583971d0eb59d433f7864ca2fa8c321a320b4c.yml diff --git a/src/resources/messages.ts b/src/resources/messages.ts index b4fabb66..03497af4 100644 --- a/src/resources/messages.ts +++ b/src/resources/messages.ts @@ -479,6 +479,7 @@ export interface MessageCreateParamsBase { */ model: | (string & {}) + | 'claude-3-5-sonnet-20240620' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' @@ -519,7 +520,7 @@ export interface MessageCreateParamsBase { * as specifying a particular goal or role. See our * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts). */ - system?: string; + system?: string | Array; /** * Amount of randomness injected into the response. diff --git a/tests/api-resources/messages.test.ts b/tests/api-resources/messages.test.ts index e1c23c77..7f71c7b7 100644 --- a/tests/api-resources/messages.test.ts +++ b/tests/api-resources/messages.test.ts @@ -13,7 +13,7 @@ describe('resource messages', () => { const responsePromise = anthropic.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, world' }], - model: 'claude-3-opus-20240229', + model: 'claude-3-5-sonnet-20240620', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -28,11 +28,11 @@ describe('resource messages', () => { const response = await anthropic.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, world' }], - model: 'claude-3-opus-20240229', + model: 'claude-3-5-sonnet-20240620', metadata: { user_id: '13803d75-b4b5-4c3e-b2a2-6f21399b021b' }, stop_sequences: ['string', 'string', 'string'], stream: false, - system: "Today's date is 2024-01-01.", + system: [{ type: 'text', text: "Today's date is 2024-06-01." }], temperature: 1, tool_choice: { type: 'auto' }, tools: [