Skip to content

Commit

Permalink
Fix: new -002 models do not accept empty text
Browse files Browse the repository at this point in the history
  • Loading branch information
johnd0e committed Sep 25, 2024
1 parent bdbbd09 commit 411cd5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const transformMessages = async (messages) => {
}
}
if (system_instruction && contents.length === 0) {
contents.push({ role: "user", parts: { text: "" } });
contents.push({ role: "model", parts: { text: " " } });
}
//console.info(JSON.stringify(contents, 2));
return { system_instruction, contents };
Expand Down

0 comments on commit 411cd5b

Please sign in to comment.