mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
fix: http raw response undefined (#2981)
This commit is contained in:
@@ -232,10 +232,15 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
|||||||
|
|
||||||
// format output value type
|
// format output value type
|
||||||
const results: Record<string, any> = {};
|
const results: Record<string, any> = {};
|
||||||
node.outputs.forEach((item) => {
|
node.outputs
|
||||||
const key = item.key.startsWith('$') ? item.key : `$.${item.key}`;
|
.filter(
|
||||||
results[item.key] = JSONPath({ path: key, json: formatResponse })[0];
|
(item) =>
|
||||||
});
|
item.key !== NodeOutputKeyEnum.error && item.key !== NodeOutputKeyEnum.httpRawResponse
|
||||||
|
)
|
||||||
|
.forEach((item) => {
|
||||||
|
const key = item.key.startsWith('$') ? item.key : `$.${item.key}`;
|
||||||
|
results[item.key] = JSONPath({ path: key, json: formatResponse })[0];
|
||||||
|
});
|
||||||
|
|
||||||
if (typeof formatResponse[NodeOutputKeyEnum.answerText] === 'string') {
|
if (typeof formatResponse[NodeOutputKeyEnum.answerText] === 'string') {
|
||||||
workflowStreamResponse?.({
|
workflowStreamResponse?.({
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { computedNodeInputReference } from '@/web/core/workflow/utils';
|
import { computedNodeInputReference } from '@/web/core/workflow/utils';
|
||||||
import { AppDetailType } from '@fastgpt/global/core/app/type';
|
import { AppDetailType } from '@fastgpt/global/core/app/type';
|
||||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
import { NodeInputKeyEnum, NodeOutputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||||
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
||||||
import { FlowNodeItemType, StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node.d';
|
import { FlowNodeItemType, StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node.d';
|
||||||
@@ -125,7 +125,7 @@ export const getEditorVariables = ({
|
|||||||
: sourceNodes
|
: sourceNodes
|
||||||
.map((node) => {
|
.map((node) => {
|
||||||
return node.outputs
|
return node.outputs
|
||||||
.filter((output) => !!output.label)
|
.filter((output) => !!output.label && output.id !== NodeOutputKeyEnum.addOutputParam)
|
||||||
.map((output) => {
|
.map((output) => {
|
||||||
return {
|
return {
|
||||||
label: t((output.label as any) || ''),
|
label: t((output.label as any) || ''),
|
||||||
|
Reference in New Issue
Block a user