From 672d9771c52679a0317ae6159e2efa295f84cd6b Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:07:47 +0100 Subject: [PATCH] feat(api): add enum to model param for message (#315) also removes claude-3 from text completions enum --- src/resources/completions.ts | 2 +- src/resources/messages.ts | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/resources/completions.ts b/src/resources/completions.ts index e916f3b3..362f7fbf 100644 --- a/src/resources/completions.ts +++ b/src/resources/completions.ts @@ -94,7 +94,7 @@ export interface CompletionCreateParamsBase { * See [models](https://docs.anthropic.com/claude/docs/models-overview) for * additional details and options. */ - model: (string & {}) | 'claude-3-opus-20240229' | 'claude-2.1' | 'claude-instant-1'; + model: (string & {}) | 'claude-2.0' | 'claude-2.1' | 'claude-instant-1.2'; /** * The prompt that you want Claude to complete. diff --git a/src/resources/messages.ts b/src/resources/messages.ts index e7063586..d469b490 100644 --- a/src/resources/messages.ts +++ b/src/resources/messages.ts @@ -390,7 +390,13 @@ export interface MessageCreateParamsBase { * See [models](https://docs.anthropic.com/claude/docs/models-overview) for * additional details and options. */ - model: string; + model: + | (string & {}) + | 'claude-3-opus-20240229' + | 'claude-3-sonnet-20240229' + | "claude-2.1'" + | 'claude-2.0' + | 'claude-instant-1.2'; /** * An object describing metadata about the request. @@ -610,7 +616,13 @@ export interface MessageStreamParams { * See [models](https://docs.anthropic.com/claude/docs/models-overview) for * additional details and options. */ - model: string; + model: + | (string & {}) + | 'claude-3-opus-20240229' + | 'claude-3-sonnet-20240229' + | "claude-2.1'" + | 'claude-2.0' + | 'claude-instant-1.2'; /** * An object describing metadata about the request.