fix: send message error when chatting with opening statement (#8627)
This commit is contained in:
parent
eaa7e9b1f0
commit
2d869d6831
4 changed files with 28 additions and 4 deletions
|
|
@ -83,11 +83,17 @@ const DebugWithSingleModel = forwardRef<DebugWithSingleModelRefType, DebugWithSi
|
|||
},
|
||||
}
|
||||
|
||||
const lastAnswer = chatListRef.current.at(-1)
|
||||
|
||||
const data: any = {
|
||||
query: message,
|
||||
inputs,
|
||||
model_config: configData,
|
||||
parent_message_id: last_answer?.id || chatListRef.current.at(-1)?.id || null,
|
||||
parent_message_id: last_answer?.id || (lastAnswer
|
||||
? lastAnswer.isOpeningStatement
|
||||
? null
|
||||
: lastAnswer.id
|
||||
: null),
|
||||
}
|
||||
|
||||
if (visionConfig.enabled && files?.length && supportVision)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue