mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Pass clean conversation history to API for Anthropic
This commit is contained in:
@@ -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]()
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user