fix: fix cannot select stream-tool-call in agent modal (#17015)

This commit is contained in:
Good Wood
2025-03-29 14:47:28 +08:00
committed by GitHub
parent 87034e26ae
commit 42968cb945
5 changed files with 14 additions and 12 deletions

6
web/utils/tool-call.ts Normal file
View File

@@ -0,0 +1,6 @@
import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
export const supportFunctionCall = (features: ModelFeatureEnum[] = []): boolean => {
if (!features || !features.length) return false
return features.some(feature => [ModelFeatureEnum.toolCall, ModelFeatureEnum.multiToolCall, ModelFeatureEnum.streamToolCall].includes(feature))
}