This commit is contained in:
Saoud Rizwan
2024-10-04 18:37:14 -04:00
parent 7b4ad310ad
commit 27abea6ca5
2 changed files with 3 additions and 4 deletions

View File

@@ -1611,7 +1611,6 @@ export class ClaudeDev {
// this also indicates the end of the text content
textContent.partial = false
// remove the partially accumulated tool use tag from the end of text (<tool)
console.log("removing from text", toolUseOpeningTag.slice(0, -1))
textContent.content = textContent.content.slice(0, -toolUseOpeningTag.slice(0, -1).length).trim()
break
}
@@ -1632,8 +1631,6 @@ export class ClaudeDev {
toolUses.push(currentToolUse)
}
console.log(assistantMessage, textContent, toolUses)
const prevLength = this.assistantMessageContent.length
this.assistantMessageContent = [textContent, ...toolUses]
if (this.assistantMessageContent.length > prevLength) {

View File

@@ -80,7 +80,9 @@ You must respond to the user's message with a SINGLE tool use. When formulating
\`\`\`
...Your thoughts...
[Tool Use]
<tool_name>
<parameter_name>value</parameter_name>
</tool_name>
\`\`\`
CRITICAL RULE: You are only allowed to use one tool per message. Multiple tool uses in a single message is STRICTLY FORBIDDEN. Even if it may seem efficient to use multiple tools at once, the system will crash and burn if you do so.