mirror of https://github.com/langgenius/dify.git
fix: types
This commit is contained in:
parent
30f771369b
commit
3f34f38635
|
|
@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
|
|||
import WeightedScore from './weighted-score'
|
||||
import TopKItem from '@/app/components/base/param-item/top-k-item'
|
||||
import ScoreThresholdItem from '@/app/components/base/param-item/score-threshold-item'
|
||||
import { RETRIEVE_TYPE } from '@/types/app'
|
||||
import { ModelModeType, RETRIEVE_TYPE } from '@/types/app'
|
||||
import type {
|
||||
DatasetConfigs,
|
||||
} from '@/models/debug'
|
||||
|
|
@ -142,6 +142,7 @@ const ConfigContent: FC<Props> = ({
|
|||
}
|
||||
|
||||
const model = singleRetrievalConfig // Legacy code, for compatibility, have to keep it
|
||||
const singleRetrievalMode = (model?.mode as ModelModeType | undefined) ?? ModelModeType.unset
|
||||
|
||||
const rerankingModeOptions = [
|
||||
{
|
||||
|
|
@ -368,7 +369,7 @@ const ConfigContent: FC<Props> = ({
|
|||
popupClassName='!w-[387px]'
|
||||
portalToFollowElemContentClassName='!z-[1002]'
|
||||
isAdvancedMode={true}
|
||||
mode={model?.mode}
|
||||
mode={singleRetrievalMode}
|
||||
provider={model?.provider}
|
||||
completionParams={model?.completion_params}
|
||||
modelId={model?.name}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ const ModelParameterTrigger: FC<ModelParameterTriggerProps> = ({
|
|||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const {
|
||||
mode,
|
||||
isAdvancedMode,
|
||||
modelModeType,
|
||||
} = useDebugConfigurationContext()
|
||||
const {
|
||||
multipleModelConfigs,
|
||||
|
|
@ -57,7 +57,7 @@ const ModelParameterTrigger: FC<ModelParameterTriggerProps> = ({
|
|||
|
||||
return (
|
||||
<ModelParameterModal
|
||||
mode={mode}
|
||||
mode={modelModeType}
|
||||
isAdvancedMode={isAdvancedMode}
|
||||
provider={modelAndParameter.provider}
|
||||
modelId={modelAndParameter.model}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import type { CommonNodeType, Node, ValueSelector } from '@/app/components/workflow/types'
|
||||
import type { CommonNodeType, Node } from '@/app/components/workflow/types'
|
||||
import type { FlowType } from '@/types/common'
|
||||
import type { NodeRunResult, VarInInspect } from '@/types/workflow'
|
||||
import type { Dispatch, SetStateAction } from 'react'
|
||||
|
||||
export enum VarType {
|
||||
variable = 'variable',
|
||||
constant = 'constant',
|
||||
mixed = 'mixed',
|
||||
}
|
||||
import type { ResourceVarInputs } from '../_base/types'
|
||||
export { VarKindType as VarType } from '../_base/types'
|
||||
|
||||
export enum DataSourceClassification {
|
||||
localFile = 'local_file',
|
||||
|
|
@ -16,10 +12,7 @@ export enum DataSourceClassification {
|
|||
onlineDrive = 'online_drive',
|
||||
}
|
||||
|
||||
export type ToolVarInputs = Record<string, {
|
||||
type: VarType
|
||||
value?: string | ValueSelector | any
|
||||
}>
|
||||
export type ToolVarInputs = ResourceVarInputs
|
||||
|
||||
export type DataSourceNodeType = CommonNodeType & {
|
||||
fileExtensions?: string[]
|
||||
|
|
|
|||
Loading…
Reference in New Issue