mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-06-07 01:35:54 +02:00
fix claude bug
This commit is contained in:
parent
a3c8ed7c85
commit
89f25498c3
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ export class Claude {
|
||||||
prev_role = msg.role;
|
prev_role = msg.role;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (messages.length > 0 && messages[0].role !== 'user') {
|
||||||
|
messages.unshift(filler); // anthropic requires user message to start
|
||||||
|
}
|
||||||
if (messages.length === 0) {
|
if (messages.length === 0) {
|
||||||
messages.push(filler);
|
messages.push(filler);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue