Skip to content

Commit

Permalink
feat(api): add new claude-3-5-sonnet-20240620 model (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jun 20, 2024
1 parent f6d2a40 commit 6868e83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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: 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
3 changes: 2 additions & 1 deletion src/resources/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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<TextBlockParam>;

/**
* Amount of randomness injected into the response.
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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: [
Expand Down

0 comments on commit 6868e83

Please sign in to comment.