mirror of
https://github.com/raidendotai/cofounder
synced 2025-01-22 18:48:02 +00:00
Update anthropic.js to use newer sonnet-1022
This commit is contained in:
parent
300b70a7da
commit
01a2112268
@ -62,7 +62,7 @@ async function _convertFromOpenaiFormat({ messages }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function inference({
|
async function inference({
|
||||||
model = "claude-3-5-sonnet-20240620",
|
model = "claude-3-5-sonnet-20241022",
|
||||||
messages,
|
messages,
|
||||||
stream = process.stdout,
|
stream = process.stdout,
|
||||||
}) {
|
}) {
|
||||||
@ -70,7 +70,7 @@ async function inference({
|
|||||||
const converted = await _convertFromOpenaiFormat({ messages });
|
const converted = await _convertFromOpenaiFormat({ messages });
|
||||||
// console.dir({ "debug:utils:anthropic": {messages : converted.messages} } , {depth:null})
|
// 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({
|
const streaming = await anthropic.messages.create({
|
||||||
model: _model,
|
model: _model,
|
||||||
stream: true,
|
stream: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user