import type { FC } from 'react' import { useTranslation } from 'react-i18next' import MemoryConfig from '../_base/components/memory-config' import VarReferencePicker from '../_base/components/variable/var-reference-picker' import useConfig from './use-config' import ResolutionPicker from './components/resolution-picker' import type { LLMNodeType } from './types' import VarList from '@/app/components/workflow/nodes/_base/components/variable/var-list' import Field from '@/app/components/workflow/nodes/_base/components/field' import AddButton from '@/app/components/base/button/add-button' import Split from '@/app/components/workflow/nodes/_base/components/split' import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal' import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars' import type { NodeProps } from '@/app/components/workflow/types' const i18nPrefix = 'workflow.nodes.llm' const Panel: FC> = ({ id, data, }) => { const { t } = useTranslation() const readOnly = false const { inputs, isShowVisionConfig, handleModelChanged, handleCompletionParamsChange, handleVarListChange, handleAddVariable, handleContextVarChange, handleMemoryChange, handleVisionResolutionChange, } = useConfig(id, data) const isChatApp = true // TODO: get from app context const model = inputs.model const modelMode = inputs.model?.mode const isChatModel = modelMode === 'chat' const isCompletionModel = !isChatModel return (
} > {/* knowledge */} {/* Prompt */} Prompt {/* Memory examples */} {isChatApp && isChatModel && (
Memory examples(Designing)
)} {/* Memory */} {isChatApp && ( <> )} {/* Vision: GPT4-vision and so on */} {isShowVisionConfig && ( } /> )}
<>
) } export default Panel