mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
Fixs:当最后一条数据因大模型没返回数据时导致调试时前端报错。 (#2637)
在lastMessageValue取值时需要提前判断空值。 Co-authored-by: zhengxianle <nopanic@ilikejobs.com>
This commit is contained in:
@@ -51,6 +51,7 @@ export const checkIsInteractiveByHistories = (chatHistories: ChatSiteItemType[])
|
||||
] as AIChatItemValueItemType;
|
||||
|
||||
return (
|
||||
lastMessageValue &&
|
||||
lastMessageValue.type === ChatItemValueTypeEnum.interactive &&
|
||||
!!lastMessageValue?.interactive?.params &&
|
||||
// 如果用户选择了,则不认为是交互模式(可能是上一轮以交互结尾,发起的新的一轮对话)
|
||||
|
Reference in New Issue
Block a user