mirror of https://github.com/langgenius/dify.git
feat: support template transform output var
This commit is contained in:
parent
9bca3f8fd7
commit
e686d42262
|
|
@ -256,3 +256,10 @@ export const KNOWLEDGE_RETRIEVAL_OUTPUT_STRUCT: Var[] = [
|
|||
type: VarType.arrayObject,
|
||||
},
|
||||
]
|
||||
|
||||
export const TEMPLATE_TRANSFORM_OUTPUT_STRUCT: Var[] = [
|
||||
{
|
||||
variable: 'output',
|
||||
type: VarType.string,
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { CodeNodeType } from '../../../code/types'
|
|||
import { BlockEnum, InputVarType, VarType } from '@/app/components/workflow/types'
|
||||
import type { StartNodeType } from '@/app/components/workflow/nodes/start/types'
|
||||
import type { NodeOutPutVar } from '@/app/components/workflow/types'
|
||||
import { KNOWLEDGE_RETRIEVAL_OUTPUT_STRUCT, LLM_OUTPUT_STRUCT, SUPPORT_OUTPUT_VARS_NODE } from '@/app/components/workflow/constants'
|
||||
import { KNOWLEDGE_RETRIEVAL_OUTPUT_STRUCT, LLM_OUTPUT_STRUCT, SUPPORT_OUTPUT_VARS_NODE, TEMPLATE_TRANSFORM_OUTPUT_STRUCT } from '@/app/components/workflow/constants'
|
||||
|
||||
const inputVarTypeToVarType = (type: InputVarType): VarType => {
|
||||
if (type === InputVarType.number)
|
||||
|
|
@ -54,6 +54,11 @@ const formatItem = (item: any): NodeOutPutVar => {
|
|||
})
|
||||
break
|
||||
}
|
||||
|
||||
case BlockEnum.TemplateTransform: {
|
||||
res.vars = TEMPLATE_TRANSFORM_OUTPUT_STRUCT
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
|
|
|
|||
Loading…
Reference in New Issue