fix anthropic tool use stateSlice update
This commit is contained in:
parent
a73e0b53c9
commit
95e1414a2e
1 changed files with 4 additions and 1 deletions
|
|
@ -264,7 +264,10 @@ export const stateSlice = createSlice({
|
|||
|
||||
if (
|
||||
action.payload.role &&
|
||||
lastMessage.message.role !== action.payload.role
|
||||
(lastMessage.message.role !== action.payload.role ||
|
||||
// This is when a tool call comes after assistant text
|
||||
(lastMessage.message.content !== "" &&
|
||||
action.payload.toolCalls?.length))
|
||||
) {
|
||||
// Create a new message
|
||||
state.history.push({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue