4.8 test fix (#1397)

* adapt v1 chat init

* adapt v1 chat init

* adapt v1 chat init

* perf: message input line; fix: http request un stream

* perf: message input line; fix: http request un stream

* perf: message input line; fix: http request un stream

* perf: error tip
This commit is contained in:
Archer
2024-05-08 22:18:22 +08:00
committed by GitHub
parent 3c6e5a6e00
commit 917e4e9262
13 changed files with 167 additions and 146 deletions

View File

@@ -290,7 +290,7 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
runtimeNodes,
runtimeEdges,
params,
mode: 'test'
mode: props.mode === 'debug' ? 'test' : props.mode
};
// run module

View File

@@ -45,6 +45,7 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
detail,
appId,
chatId,
stream,
responseChatItemId,
variables,
node: { outputs },
@@ -132,7 +133,7 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
results[key] = valueTypeFormat(formatResponse[key], output.valueType);
}
if (typeof formatResponse[NodeOutputKeyEnum.answerText] === 'string') {
if (stream && typeof formatResponse[NodeOutputKeyEnum.answerText] === 'string') {
responseWrite({
res,
event: detail ? SseResponseEventEnum.fastAnswer : undefined,