fix: cannot send message when debug with multiple model with conversa… (#11333)

This commit is contained in:
Hash Brown 2024-12-04 16:17:11 +08:00 committed by GitHub
parent 1bae9b8ff7
commit 16a65cb367
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,6 +29,7 @@ import { useAppContext } from '@/context/app-context'
import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
import { useFeatures } from '@/app/components/base/features/hooks' import { useFeatures } from '@/app/components/base/features/hooks'
import type { InputForm } from '@/app/components/base/chat/chat/type' import type { InputForm } from '@/app/components/base/chat/chat/type'
import { getLastAnswer } from '@/app/components/base/chat/utils'
type ChatItemProps = { type ChatItemProps = {
modelAndParameter: ModelAndParameter modelAndParameter: ModelAndParameter
@ -101,7 +102,7 @@ const ChatItem: FC<ChatItemProps> = ({
query: message, query: message,
inputs, inputs,
model_config: configData, model_config: configData,
parent_message_id: chatListRef.current.at(-1)?.id || null, parent_message_id: getLastAnswer(chatListRef.current)?.id || null,
} }
if ((config.file_upload as any).enabled && files?.length && supportVision) if ((config.file_upload as any).enabled && files?.length && supportVision)