mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 09:44:47 +00:00
perf: http node response
This commit is contained in:
@@ -158,8 +158,7 @@ export const ChatModule: FlowModuleTemplateType = {
|
|||||||
label: '系统提示词',
|
label: '系统提示词',
|
||||||
valueType: FlowValueTypeEnum.string,
|
valueType: FlowValueTypeEnum.string,
|
||||||
description: ChatModelSystemTip,
|
description: ChatModelSystemTip,
|
||||||
placeholder: ChatModelSystemTip,
|
placeholder: ChatModelSystemTip
|
||||||
value: ''
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'limitPrompt',
|
key: 'limitPrompt',
|
||||||
@@ -167,8 +166,7 @@ export const ChatModule: FlowModuleTemplateType = {
|
|||||||
valueType: FlowValueTypeEnum.string,
|
valueType: FlowValueTypeEnum.string,
|
||||||
label: '限定词',
|
label: '限定词',
|
||||||
description: ChatModelLimitTip,
|
description: ChatModelLimitTip,
|
||||||
placeholder: ChatModelLimitTip,
|
placeholder: ChatModelLimitTip
|
||||||
value: ''
|
|
||||||
},
|
},
|
||||||
Input_Template_TFSwitch,
|
Input_Template_TFSwitch,
|
||||||
{
|
{
|
||||||
|
@@ -56,7 +56,7 @@ const NodeHttp = ({
|
|||||||
moduleId,
|
moduleId,
|
||||||
type: 'outputs',
|
type: 'outputs',
|
||||||
key,
|
key,
|
||||||
value: outputs.concat([
|
value: [
|
||||||
{
|
{
|
||||||
key,
|
key,
|
||||||
label: `出参${outputs.length}`,
|
label: `出参${outputs.length}`,
|
||||||
@@ -65,7 +65,7 @@ const NodeHttp = ({
|
|||||||
edit: true,
|
edit: true,
|
||||||
targets: []
|
targets: []
|
||||||
}
|
}
|
||||||
])
|
].concat(outputs as any)
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@@ -85,7 +85,14 @@ const Label = ({
|
|||||||
value: outputs.map((output) => (output.key === outputKey ? data : output))
|
value: outputs.map((output) => (output.key === outputKey ? data : output))
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const storeOutputs = outputs.filter((output) => output.key !== editField.key);
|
let index = 0;
|
||||||
|
const storeOutputs = outputs.filter((output, i) => {
|
||||||
|
if (output.key !== editField.key) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
index = i;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
onChangeNode({
|
onChangeNode({
|
||||||
moduleId,
|
moduleId,
|
||||||
@@ -94,11 +101,13 @@ const Label = ({
|
|||||||
value: storeOutputs
|
value: storeOutputs
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
storeOutputs.splice(index, 0, data);
|
||||||
|
console.log(index, storeOutputs);
|
||||||
onChangeNode({
|
onChangeNode({
|
||||||
moduleId,
|
moduleId,
|
||||||
type: 'outputs',
|
type: 'outputs',
|
||||||
key: '',
|
key: '',
|
||||||
value: storeOutputs.concat(data)
|
value: [...storeOutputs]
|
||||||
});
|
});
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ export type Response = {
|
|||||||
|
|
||||||
const agentModel = 'gpt-3.5-turbo';
|
const agentModel = 'gpt-3.5-turbo';
|
||||||
const agentFunName = 'agent_extract_data';
|
const agentFunName = 'agent_extract_data';
|
||||||
const maxTokens = 3000;
|
const maxTokens = 4000;
|
||||||
|
|
||||||
export async function dispatchContentExtract({
|
export async function dispatchContentExtract({
|
||||||
userOpenaiAccount,
|
userOpenaiAccount,
|
||||||
|
Reference in New Issue
Block a user