mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Pass clean conversation history to API for Anthropic
This commit is contained in:
5
.changeset/stupid-pears-help.md
Normal file
5
.changeset/stupid-pears-help.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"roo-cline": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Hotfix
|
||||||
@@ -807,7 +807,9 @@ export class Cline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const stream = this.api.createMessage(systemPrompt, this.apiConversationHistory)
|
// Convert to Anthropic.MessageParam by spreading only the API-required properties
|
||||||
|
const cleanConversationHistory = this.apiConversationHistory.map(({ role, content }) => ({ role, content }))
|
||||||
|
const stream = this.api.createMessage(systemPrompt, cleanConversationHistory)
|
||||||
const iterator = stream[Symbol.asyncIterator]()
|
const iterator = stream[Symbol.asyncIterator]()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user