mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 10:56:52 +08:00
fix: fix cannot select stream-tool-call in agent modal (#17015)
This commit is contained in:
@@ -55,6 +55,7 @@ export enum ModelFeatureEnum {
|
||||
toolCall = 'tool-call',
|
||||
multiToolCall = 'multi-tool-call',
|
||||
agentThought = 'agent-thought',
|
||||
streamToolCall = 'stream-tool-call',
|
||||
vision = 'vision',
|
||||
video = 'video',
|
||||
document = 'document',
|
||||
|
||||
@@ -15,6 +15,7 @@ import { useLanguage } from '../hooks'
|
||||
import PopupItem from './popup-item'
|
||||
import { XCircle } from '@/app/components/base/icons/src/vender/solid/general'
|
||||
import { useModalContext } from '@/context/modal-context'
|
||||
import { supportFunctionCall } from '@/utils/tool-call'
|
||||
|
||||
type PopupProps = {
|
||||
defaultModel?: DefaultModel
|
||||
@@ -50,7 +51,7 @@ const Popup: FC<PopupProps> = ({
|
||||
return true
|
||||
return scopeFeatures.every((feature) => {
|
||||
if (feature === ModelFeatureEnum.toolCall)
|
||||
return modelItem.features?.some(featureItem => featureItem === ModelFeatureEnum.toolCall || featureItem === ModelFeatureEnum.multiToolCall)
|
||||
return supportFunctionCall(modelItem.features)
|
||||
return modelItem.features?.some(featureItem => featureItem === feature)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user