fix: CQ module output (#445)

This commit is contained in:
Archer
2023-10-30 16:45:36 +08:00
committed by GitHub
parent 60ee160131
commit 661ee79943
7 changed files with 72 additions and 6 deletions

View File

@@ -121,14 +121,13 @@ const NodeCQNode = ({ data }: NodeProps<FlowModuleItemType>) => {
onChangeNode({
moduleId,
type: 'updateOutput',
key: agentKey,
value: outputs.concat({
type: 'addOutput',
value: {
key,
label: '',
type: FlowNodeOutputTypeEnum.hidden,
targets: []
})
}
});
}}
>

View File

@@ -127,6 +127,9 @@ ${systemPrompt}
tokens: response.usage?.total_tokens || 0
};
} catch (error) {
console.log(agentFunction.parameters);
console.log(response.choices?.[0]?.message);
console.log('Your model may not support function_call', error);
return {

View File

@@ -141,6 +141,9 @@ async function functionCall({
try {
return JSON.parse(response.choices?.[0]?.message?.function_call?.arguments || '{}');
} catch (error) {
console.log(agentFunction.parameters);
console.log(response.choices?.[0]?.message);
console.log('Your model may not support function_call', error);
return {};
}
})();