mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
add format prompt values to prompt template
This commit is contained in:
@@ -43,9 +43,13 @@ export const ReactFlowContext = ({ children }) => {
|
||||
if (node.id === targetNodeId) {
|
||||
let value
|
||||
const inputAnchor = node.data.inputAnchors.find((ancr) => ancr.name === targetInput)
|
||||
const inputParam = node.data.inputParams.find((param) => param.name === targetInput)
|
||||
|
||||
if (inputAnchor && inputAnchor.list) {
|
||||
const values = node.data.inputs[targetInput] || []
|
||||
value = values.filter((item) => !item.includes(sourceNodeId))
|
||||
} else if (inputParam && inputParam.acceptVariable) {
|
||||
value = node.data.inputs[targetInput].replace(`{{${sourceNodeId}.data.instance}}`, '') || ''
|
||||
} else {
|
||||
value = ''
|
||||
}
|
||||
|
||||
@@ -36,6 +36,11 @@ export const Input = ({ inputParam, value, onChange, disabled = false, showDialo
|
||||
setMyValue(e.target.value)
|
||||
onChange(e.target.value)
|
||||
}}
|
||||
inputProps={{
|
||||
style: {
|
||||
height: inputParam.rows ? '90px' : 'inherit'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
<EditPromptValuesDialog
|
||||
|
||||
Reference in New Issue
Block a user