feat: handle questioin classify

This commit is contained in:
Joel
2024-03-18 11:26:26 +08:00
parent b8ecfd859b
commit 13dbc7f0ce
4 changed files with 18 additions and 9 deletions

View File

@ -28,6 +28,8 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
} = useModelListAndDefaultModelAndCurrentProviderAndModel(1)
const model = inputs.model
const modelMode = inputs.model?.mode
const isChatModel = modelMode === 'chat'
const handleModelChanged = useCallback((model: { provider: string; modelId: string; mode?: string }) => {
const newInputs = produce(inputRef.current, (draft) => {
@ -133,6 +135,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
return {
inputs,
handleModelChanged,
isChatModel,
handleCompletionParamsChange,
handleQueryVarChange,
filterVar,