Skip to content

Commit

Permalink
chore (examples): update to claude-3-5-sonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrammel committed Jun 25, 2024
1 parent a92523c commit d4fa753
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/ai-core/src/generate-object/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config();

async function main() {
const result = await generateObject({
model: anthropic('claude-3-opus-20240229'),
model: anthropic('claude-3-5-sonnet-20240620'),
schema: z.object({
recipe: z.object({
name: z.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function main() {

const { text, toolCalls, toolResults, responseMessages } =
await generateText({
model: anthropic('claude-3-opus-20240229'),
model: anthropic('claude-3-5-sonnet-20240620'),
tools: { weatherTool },
system: `You are a helpful, respectful and honest assistant.`,
messages,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const anthropic = createAnthropic({

async function main() {
const result = await generateText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
prompt: 'Invent a new holiday and describe its traditions.',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenv.config();

async function main() {
const result = await generateText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
maxTokens: 512,
messages: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/generate-text/anthropic-multimodal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config();

async function main() {
const result = await generateText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
maxTokens: 512,
messages: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/generate-text/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenv.config();

async function main() {
const result = await generateText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
prompt: 'Invent a new holiday and describe its traditions.',
});

Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/stream-object/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config();

async function main() {
const result = await streamObject({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
maxTokens: 2000,
schema: z.object({
characters: z.array(
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/stream-text/anthropic-fullstream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dotenv.config();

async function main() {
const result = await streamText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
tools: {
weather: weatherTool,
cityAttractions: {
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/stream-text/anthropic-multimodal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config();

async function main() {
const result = await streamText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
maxTokens: 512,
messages: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-core/src/stream-text/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dotenv.config();

async function main() {
const result = await streamText({
model: anthropic('claude-3-haiku-20240307'),
model: anthropic('claude-3-5-sonnet-20240620'),
prompt: 'Invent a new holiday and describe its traditions.',
});

Expand Down

0 comments on commit d4fa753

Please sign in to comment.