* Milvus (#1644)

* feat: support regx

* 4.8.3 test and fix (#1648)

* perf: version tip

* feat: sandbox support log

* fix: debug component render

* fix: share page header

* fix: input guide auth

* fix: iso viewport

* remove file

* fix: route url

* feat: add debug timout

* perf: reference select support trigger

* perf: session code

* perf: theme

* perf: load milvus
This commit is contained in:
Archer
2024-06-01 09:26:11 +08:00
committed by GitHub
parent 9fc6a8c74a
commit a259d034b8
81 changed files with 1775 additions and 594 deletions

View File

@@ -1,6 +1,6 @@
import { ErrType } from '../errorCode';
/* dataset: 507000 */
/* dataset: 508000 */
export enum PluginErrEnum {
unExist = 'pluginUnExist',
unAuth = 'pluginUnAuth'
@@ -19,7 +19,7 @@ export default errList.reduce((acc, cur, index) => {
return {
...acc,
[cur.statusText]: {
code: 507000 + index,
code: 508000 + index,
statusText: cur.statusText,
message: cur.message,
data: null

View File

@@ -0,0 +1,23 @@
import { ErrType } from '../errorCode';
/* dataset: 509000 */
export enum SystemErrEnum {
communityVersionNumLimit = 'communityVersionNumLimit'
}
const systemErr = [
{
statusText: SystemErrEnum.communityVersionNumLimit,
message: '超出开源版数量限制,请升级商业版: https://fastgpt.in'
}
];
export default systemErr.reduce((acc, cur, index) => {
return {
...acc,
[cur.statusText]: {
code: 509000 + index,
statusText: cur.statusText,
message: cur.message,
data: null
}
};
}, {} as ErrType<`${SystemErrEnum}`>);

View File

@@ -7,6 +7,7 @@ import outLinkErr from './code/outLink';
import teamErr from './code/team';
import userErr from './code/user';
import commonErr from './code/common';
import SystemErrEnum from './code/system';
export const ERROR_CODE: { [key: number]: string } = {
400: '请求失败',
@@ -98,5 +99,6 @@ export const ERROR_RESPONSE: Record<
...teamErr,
...userErr,
...pluginErr,
...commonErr
...commonErr,
...SystemErrEnum
};

View File

@@ -1,7 +1,10 @@
import { replaceSensitiveText } from '../string/tools';
export const getErrText = (err: any, def = '') => {
const msg: string = typeof err === 'string' ? err : err?.message ?? def;
const msg: string =
typeof err === 'string'
? err
: err?.response?.data?.message || err?.response?.message || err?.message || def;
msg && console.log('error =>', msg);
return replaceSensitiveText(msg);
};

View File

@@ -1 +0,0 @@
export const PgDatasetTableName = 'modeldata';

View File

@@ -84,6 +84,9 @@ export type DispatchNodeResponseType = {
toolCallTokens?: number;
toolDetail?: ChatHistoryItemResType[];
toolStop?: boolean;
// code
codeLog?: string;
};
export type DispatchNodeResultType<T> = {

View File

@@ -8,6 +8,8 @@ export enum VariableConditionEnum {
startWith = 'startWith',
endWith = 'endWith',
reg = 'reg',
greaterThan = 'greaterThan',
greaterThanOrEqualTo = 'greaterThanOrEqualTo',
lessThan = 'lessThan',
@@ -31,6 +33,7 @@ export const stringConditionList = [
{ label: '不为空', value: VariableConditionEnum.isNotEmpty },
{ label: '等于', value: VariableConditionEnum.equalTo },
{ label: '不等于', value: VariableConditionEnum.notEqual },
{ label: '正则', value: VariableConditionEnum.reg },
{ label: '包含', value: VariableConditionEnum.include },
{ label: '不包含', value: VariableConditionEnum.notInclude },
{ label: '开始为', value: VariableConditionEnum.startWith },

View File

@@ -67,6 +67,20 @@ export const CodeNode: FlowNodeTemplateType = {
description: '代码运行错误信息,成功时返回空',
valueType: WorkflowIOValueTypeEnum.object,
type: FlowNodeOutputTypeEnum.static
},
{
id: 'qLUQfhG0ILRX',
type: FlowNodeOutputTypeEnum.dynamic,
key: 'result',
valueType: WorkflowIOValueTypeEnum.string,
label: 'result'
},
{
id: 'gR0mkQpJ4Og8',
type: FlowNodeOutputTypeEnum.dynamic,
key: 'data2',
valueType: WorkflowIOValueTypeEnum.string,
label: 'data2'
}
]
};

View File

@@ -43,7 +43,7 @@ export type FlowNodeInputItemType = {
export type FlowNodeOutputItemType = {
id: string; // output unique id(Does not follow the key change)
type: `${FlowNodeOutputTypeEnum}`;
type: FlowNodeOutputTypeEnum;
key: `${NodeOutputKeyEnum}` | string;
valueType?: WorkflowIOValueTypeEnum;
value?: any;