Skip to content

Commit d913ee4

Browse files
committed
Merge branch 'elsa-0.1.x'
2 parents 75a4ab0 + ead3bb8 commit d913ee4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

framework/elsa/fit-elsa-react/src/components/llm/LlmOutput.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ function _LlmOutput({outputItems, enableLogData, disabled}) {
6262
forceRender
6363
>
6464
<div className={"jade-custom-panel-content"}>
65-
<Form.Item className='jade-form-item' name={`enableLog-${enableLogData.id}`}>
65+
{enableLogData && <Form.Item className="jade-form-item" name={`enableLog-${enableLogData.id}`}>
6666
<Checkbox checked={enableLogData.value} disabled={disabled}
67-
onChange={e => dispatch({ type: 'updateLogStatus', value: e.target.checked})}><span
67+
onChange={e => dispatch({type: 'updateLogStatus', value: e.target.checked})}><span
6868
className={'jade-font-size'}>{t('pushResultToChat')}</span></Checkbox>
69-
</Form.Item>
69+
</Form.Item>}
7070
<JadeObservableTree data={outputItems}/>
7171
</div>
7272
</Panel>

framework/elsa/fit-elsa-react/src/flow/compatibility/compatibilityProcessors.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,24 @@ export const llmCompatibilityProcessor = (shapeData, graph, pageHandler) => {
364364
}
365365
};
366366

367+
const addEnableLog = (inputParams) => {
368+
if (!inputParams.some(item => item.name === 'enableLog')) {
369+
inputParams.push({
370+
id: uuidv4(),
371+
from: FROM_TYPE.INPUT,
372+
name: 'enableLog',
373+
type: DATA_TYPES.BOOLEAN,
374+
value: true,
375+
});
376+
}
377+
}
378+
367379
const inputParams = self.shapeData.flowMeta.jober.converter.entity.inputParams;
368380
const outputObject = self.shapeData.flowMeta.jober.converter.entity.outputParams.find(i => i.name === 'output');
369381
ensureParam(inputParams, DEFAULT_MAX_MEMORY_ROUNDS);
370382
ensureParam(inputParams, DEFAULT_LLM_KNOWLEDGE_BASES);
371383
ensureParam(outputObject.value, DEFAULT_LLM_REFERENCE_OUTPUT);
384+
addEnableLog(inputParams);
372385
if (!self.shapeData.flowMeta.jober.converter.entity.tempReference) {
373386
self.shapeData.flowMeta.jober.converter.entity.tempReference = {};
374387
}

0 commit comments

Comments
 (0)