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
commit 42968cb945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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))
}