Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update anthropic.js to use newer sonnet-1022 #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cofounder/api/utils/anthropic.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ async function _convertFromOpenaiFormat({ messages }) {
}

async function inference({
model = "claude-3-5-sonnet-20240620",
model = "claude-3-5-sonnet-20241022",
messages,
stream = process.stdout,
}) {
// messages are in openai format , need conversion
const converted = await _convertFromOpenaiFormat({ messages });
// console.dir({ "debug:utils:anthropic": {messages : converted.messages} } , {depth:null})

const _model = model.includes("gpt") ? "claude-3-5-sonnet-20240620" : model;
const _model = model.includes("gpt") ? "claude-3-5-sonnet-20241022" : model;
const streaming = await anthropic.messages.create({
model: _model,
stream: true,
Expand Down