mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
Claude reasoning small fix
This commit is contained in:
parent
bf9852858e
commit
9bd97d0cd5
1 changed files with 7 additions and 1 deletions
|
|
@ -143,13 +143,19 @@ const prepareMessages_anthropic_tools = (messages: SimpleLLMMessage[], supportsA
|
||||||
// add anthropic reasoning
|
// add anthropic reasoning
|
||||||
if (currMsg.role === 'assistant') {
|
if (currMsg.role === 'assistant') {
|
||||||
if (currMsg.anthropicReasoning && supportsAnthropicReasoning) {
|
if (currMsg.anthropicReasoning && supportsAnthropicReasoning) {
|
||||||
|
|
||||||
const content = currMsg.content
|
const content = currMsg.content
|
||||||
newMessages[i] = {
|
newMessages[i] = {
|
||||||
role: 'assistant',
|
role: 'assistant',
|
||||||
content: content ? [...currMsg.anthropicReasoning, { type: 'text' as const, text: content }] : currMsg.anthropicReasoning
|
content: content ? [...currMsg.anthropicReasoning, { type: 'text' as const, text: content }] : currMsg.anthropicReasoning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
newMessages[i] = {
|
||||||
|
role: 'assistant',
|
||||||
|
content: currMsg.content,
|
||||||
|
// strip away anthropicReasoning
|
||||||
|
}
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue