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

@@ -2,7 +2,7 @@ import { ErrType } from '../errorCode';
/* dataset: 502000 */
export enum AppErrEnum {
unExist = 'unExist',
unExist = 'appUnExist',
unAuthApp = 'unAuthApp'
}
const appErrList = [

View File

@@ -2,8 +2,8 @@ import { ErrType } from '../errorCode';
/* dataset: 506000 */
export enum OpenApiErrEnum {
unExist = 'unExist',
unAuth = 'unAuth'
unExist = 'openapiUnExist',
unAuth = 'openapiUnAuth'
}
const errList = [
{

View File

@@ -2,7 +2,7 @@ import { ErrType } from '../errorCode';
/* dataset: 505000 */
export enum OutLinkErrEnum {
unExist = 'unExist',
unExist = 'outlinkUnExist',
unAuthLink = 'unAuthLink',
linkUnInvalid = 'linkUnInvalid',

View File

@@ -2,8 +2,8 @@ import { ErrType } from '../errorCode';
/* dataset: 507000 */
export enum PluginErrEnum {
unExist = 'unExist',
unAuth = 'unAuth'
unExist = 'pluginUnExist',
unAuth = 'pluginUnAuth'
}
const errList = [
{

View File

@@ -15,7 +15,7 @@ export const VariableUpdateNode: FlowNodeTemplateType = {
targetHandle: getHandleConfig(true, true, true, true),
avatar: '/imgs/workflow/variable.png',
name: '变量更新',
intro: '可以更新指定节点的输出值全局变量',
intro: '可以更新指定节点的输出值或更新全局变量',
showStatus: true,
isTool: false,
inputs: [

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,