@fastgpt-plugin/helpers 0.0.1-alpha.6 → 0.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datasets/schemas.d.ts +156 -0
- package/dist/datasets/schemas.js +1 -0
- package/dist/events/type.d.ts +3 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/models/constants.d.ts +23 -0
- package/dist/models/constants.js +1 -0
- package/dist/tools/constants.d.ts +9 -1
- package/dist/tools/constants.js +1 -1
- package/dist/tools/helper.d.ts +17 -117
- package/dist/tools/schemas/fastgpt.d.ts +21 -21
- package/dist/tools/schemas/permission.d.ts +18 -0
- package/dist/tools/schemas/permission.js +1 -0
- package/dist/tools/schemas/req.d.ts +1 -0
- package/dist/tools/schemas/req.js +1 -1
- package/dist/tools/schemas/tool.d.ts +236 -362
- package/dist/tools/schemas/tool.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { z as z$1 } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/datasets/schemas.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Plugin Dataset Source ID 常量
|
|
6
|
+
*/
|
|
7
|
+
declare const PluginDatasetSourceIds: {
|
|
8
|
+
readonly customApi: "custom-api";
|
|
9
|
+
readonly feishu: "feishu";
|
|
10
|
+
readonly yuque: "yuque";
|
|
11
|
+
};
|
|
12
|
+
type PluginDatasetSourceId = (typeof PluginDatasetSourceIds)[keyof typeof PluginDatasetSourceIds];
|
|
13
|
+
declare const DatasetSourceIdEnum: z$1.ZodEnum<{
|
|
14
|
+
"custom-api": "custom-api";
|
|
15
|
+
feishu: "feishu";
|
|
16
|
+
yuque: "yuque";
|
|
17
|
+
}>;
|
|
18
|
+
type DatasetSourceId = z$1.infer<typeof DatasetSourceIdEnum>;
|
|
19
|
+
declare const FormFieldTypeEnum: z$1.ZodEnum<{
|
|
20
|
+
input: "input";
|
|
21
|
+
password: "password";
|
|
22
|
+
select: "select";
|
|
23
|
+
"tree-select": "tree-select";
|
|
24
|
+
}>;
|
|
25
|
+
declare const FormFieldConfigSchema: z$1.ZodObject<{
|
|
26
|
+
key: z$1.ZodString;
|
|
27
|
+
label: z$1.ZodObject<{
|
|
28
|
+
en: z$1.ZodString;
|
|
29
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
30
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
31
|
+
}, z$1.core.$strip>;
|
|
32
|
+
type: z$1.ZodEnum<{
|
|
33
|
+
input: "input";
|
|
34
|
+
password: "password";
|
|
35
|
+
select: "select";
|
|
36
|
+
"tree-select": "tree-select";
|
|
37
|
+
}>;
|
|
38
|
+
required: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
39
|
+
placeholder: z$1.ZodOptional<z$1.ZodObject<{
|
|
40
|
+
en: z$1.ZodString;
|
|
41
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
42
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
43
|
+
}, z$1.core.$strip>>;
|
|
44
|
+
description: z$1.ZodOptional<z$1.ZodObject<{
|
|
45
|
+
en: z$1.ZodString;
|
|
46
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
47
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
48
|
+
}, z$1.core.$strip>>;
|
|
49
|
+
options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
50
|
+
label: z$1.ZodObject<{
|
|
51
|
+
en: z$1.ZodString;
|
|
52
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
53
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
54
|
+
}, z$1.core.$strip>;
|
|
55
|
+
value: z$1.ZodString;
|
|
56
|
+
}, z$1.core.$strip>>>;
|
|
57
|
+
}, z$1.core.$strip>;
|
|
58
|
+
declare const DatasetSourceInfoSchema: z$1.ZodObject<{
|
|
59
|
+
sourceId: z$1.ZodEnum<{
|
|
60
|
+
"custom-api": "custom-api";
|
|
61
|
+
feishu: "feishu";
|
|
62
|
+
yuque: "yuque";
|
|
63
|
+
}>;
|
|
64
|
+
name: z$1.ZodObject<{
|
|
65
|
+
en: z$1.ZodString;
|
|
66
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
67
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
68
|
+
}, z$1.core.$strip>;
|
|
69
|
+
icon: z$1.ZodString;
|
|
70
|
+
iconOutline: z$1.ZodOptional<z$1.ZodString>;
|
|
71
|
+
description: z$1.ZodOptional<z$1.ZodObject<{
|
|
72
|
+
en: z$1.ZodString;
|
|
73
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
74
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
75
|
+
}, z$1.core.$strip>>;
|
|
76
|
+
courseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
77
|
+
}, z$1.core.$strip>;
|
|
78
|
+
declare const DatasetSourceConfigSchema: z$1.ZodObject<{
|
|
79
|
+
sourceId: z$1.ZodEnum<{
|
|
80
|
+
"custom-api": "custom-api";
|
|
81
|
+
feishu: "feishu";
|
|
82
|
+
yuque: "yuque";
|
|
83
|
+
}>;
|
|
84
|
+
name: z$1.ZodObject<{
|
|
85
|
+
en: z$1.ZodString;
|
|
86
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
87
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
88
|
+
}, z$1.core.$strip>;
|
|
89
|
+
icon: z$1.ZodString;
|
|
90
|
+
iconOutline: z$1.ZodOptional<z$1.ZodString>;
|
|
91
|
+
description: z$1.ZodOptional<z$1.ZodObject<{
|
|
92
|
+
en: z$1.ZodString;
|
|
93
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
94
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
95
|
+
}, z$1.core.$strip>>;
|
|
96
|
+
courseUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
97
|
+
formFields: z$1.ZodArray<z$1.ZodObject<{
|
|
98
|
+
key: z$1.ZodString;
|
|
99
|
+
label: z$1.ZodObject<{
|
|
100
|
+
en: z$1.ZodString;
|
|
101
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
102
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
103
|
+
}, z$1.core.$strip>;
|
|
104
|
+
type: z$1.ZodEnum<{
|
|
105
|
+
input: "input";
|
|
106
|
+
password: "password";
|
|
107
|
+
select: "select";
|
|
108
|
+
"tree-select": "tree-select";
|
|
109
|
+
}>;
|
|
110
|
+
required: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
111
|
+
placeholder: z$1.ZodOptional<z$1.ZodObject<{
|
|
112
|
+
en: z$1.ZodString;
|
|
113
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
114
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
115
|
+
}, z$1.core.$strip>>;
|
|
116
|
+
description: z$1.ZodOptional<z$1.ZodObject<{
|
|
117
|
+
en: z$1.ZodString;
|
|
118
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
119
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
120
|
+
}, z$1.core.$strip>>;
|
|
121
|
+
options: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
122
|
+
label: z$1.ZodObject<{
|
|
123
|
+
en: z$1.ZodString;
|
|
124
|
+
'zh-CN': z$1.ZodOptional<z$1.ZodString>;
|
|
125
|
+
'zh-Hant': z$1.ZodOptional<z$1.ZodString>;
|
|
126
|
+
}, z$1.core.$strip>;
|
|
127
|
+
value: z$1.ZodString;
|
|
128
|
+
}, z$1.core.$strip>>>;
|
|
129
|
+
}, z$1.core.$strip>>;
|
|
130
|
+
}, z$1.core.$strip>;
|
|
131
|
+
declare const FileItemSchema: z$1.ZodObject<{
|
|
132
|
+
id: z$1.ZodString;
|
|
133
|
+
rawId: z$1.ZodOptional<z$1.ZodString>;
|
|
134
|
+
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
135
|
+
name: z$1.ZodString;
|
|
136
|
+
type: z$1.ZodEnum<{
|
|
137
|
+
file: "file";
|
|
138
|
+
folder: "folder";
|
|
139
|
+
}>;
|
|
140
|
+
updateTime: z$1.ZodOptional<z$1.ZodString>;
|
|
141
|
+
createTime: z$1.ZodOptional<z$1.ZodString>;
|
|
142
|
+
hasChild: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
143
|
+
}, z$1.core.$strip>;
|
|
144
|
+
declare const FileContentResponseSchema: z$1.ZodObject<{
|
|
145
|
+
title: z$1.ZodOptional<z$1.ZodString>;
|
|
146
|
+
rawText: z$1.ZodOptional<z$1.ZodString>;
|
|
147
|
+
previewUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
148
|
+
}, z$1.core.$strip>;
|
|
149
|
+
type FormFieldType = z$1.infer<typeof FormFieldTypeEnum>;
|
|
150
|
+
type FormFieldConfig = z$1.infer<typeof FormFieldConfigSchema>;
|
|
151
|
+
type DatasetSourceInfo = z$1.infer<typeof DatasetSourceInfoSchema>;
|
|
152
|
+
type DatasetSourceConfig = z$1.infer<typeof DatasetSourceConfigSchema>;
|
|
153
|
+
type FileItem = z$1.infer<typeof FileItemSchema>;
|
|
154
|
+
type FileContentResponse = z$1.infer<typeof FileContentResponseSchema>;
|
|
155
|
+
//#endregion
|
|
156
|
+
export { DatasetSourceConfig, DatasetSourceConfigSchema, DatasetSourceId, DatasetSourceIdEnum, DatasetSourceInfo, DatasetSourceInfoSchema, FileContentResponse, FileContentResponseSchema, FileItem, FileItemSchema, FormFieldConfig, FormFieldConfigSchema, FormFieldType, FormFieldTypeEnum, PluginDatasetSourceId, PluginDatasetSourceIds };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I18nStringSchema as e}from"../common/schemas/i18n.js";import{z as t}from"zod";const n={customApi:`custom-api`,feishu:`feishu`,yuque:`yuque`},r=t.enum([`yuque`,`feishu`,`custom-api`]),i=t.enum([`input`,`password`,`select`,`tree-select`]),a=t.object({key:t.string(),label:e,type:i,required:t.boolean().optional(),placeholder:e.optional(),description:e.optional(),options:t.array(t.object({label:e,value:t.string()})).optional()}),o=t.object({sourceId:r,name:e,icon:t.string(),iconOutline:t.string().optional(),description:e.optional(),courseUrl:t.string().optional()}),s=o.extend({formFields:t.array(a)}),c=t.object({id:t.string(),rawId:t.string().optional(),parentId:t.string().nullable().optional(),name:t.string(),type:t.enum([`file`,`folder`]),updateTime:t.string().optional(),createTime:t.string().optional(),hasChild:t.boolean().optional()}),l=t.object({title:t.string().optional(),rawText:t.string().optional(),previewUrl:t.string().optional()});export{s as DatasetSourceConfigSchema,r as DatasetSourceIdEnum,o as DatasetSourceInfoSchema,l as FileContentResponseSchema,c as FileItemSchema,a as FormFieldConfigSchema,i as FormFieldTypeEnum,n as PluginDatasetSourceIds};
|
package/dist/events/type.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import { Cherrio2MdInput, Cherrio2MdResult, FileInput } from "./schemas.js";
|
|
|
6
6
|
interface EventEmitter {
|
|
7
7
|
uploadFile(input: FileInput): Promise<FileMetadata>;
|
|
8
8
|
streamResponse(input: StreamMessageType): void;
|
|
9
|
-
html2md(
|
|
9
|
+
html2md(data: {
|
|
10
|
+
html: string;
|
|
11
|
+
}): Promise<string>;
|
|
10
12
|
cherrio2md(input: Cherrio2MdInput): Promise<Cherrio2MdResult>;
|
|
11
13
|
}
|
|
12
14
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,15 @@ import { batch, catchError, delay } from "./common/fn.js";
|
|
|
2
2
|
import { ensureDir, refreshDir } from "./common/fs.js";
|
|
3
3
|
import { I18nStringSchema, I18nStringStrictSchema, I18nStringStrictType, I18nStringType } from "./common/schemas/i18n.js";
|
|
4
4
|
import { pkg, unpkg } from "./common/zip.js";
|
|
5
|
+
import { DatasetSourceConfig, DatasetSourceConfigSchema, DatasetSourceId, DatasetSourceIdEnum, DatasetSourceInfo, DatasetSourceInfoSchema, FileContentResponse, FileContentResponseSchema, FileItem, FileItemSchema, FormFieldConfig, FormFieldConfigSchema, FormFieldType, FormFieldTypeEnum, PluginDatasetSourceId, PluginDatasetSourceIds } from "./datasets/schemas.js";
|
|
5
6
|
import { EventEmitter } from "./events/type.js";
|
|
6
7
|
import { StreamDataAnswerTypeEnum, StreamDataSchema, StreamDataType, StreamMessageSchema, StreamMessageType, StreamMessageTypeEnum, SystemVarSchema, SystemVarType, ToolContextType, ToolHandlerFunctionType, ToolHandlerReturnSchema, ToolHandlerReturnType } from "./tools/schemas/req.js";
|
|
7
8
|
import { Cherrio2MdInput, Cherrio2MdResult, EventEnumType, FileInput } from "./events/schemas.js";
|
|
8
9
|
import { ToolConfigSchema, ToolDetailSchema, ToolDetailType, ToolSchema, ToolSetConfigSchema, ToolSetSchema, ToolSimpleSchema, ToolSimpleType, ToolTagEnum, UnifiedToolSchema, VersionListItemSchema, VersionListItemType } from "./tools/schemas/tool.js";
|
|
9
10
|
import { defineTool, defineToolSet } from "./tools/helper.js";
|
|
10
11
|
import { EmbeddingModelItemSchema, LLMModelItemSchema, ListModelsSchema, ListModelsType, ModelItemSchema, ModelItemType, ModelTypeEnum, RerankModelItemSchema, STTModelSchema, TTSModelSchema } from "./models/schemas.js";
|
|
12
|
+
import { AiproxyMapProviderType, ModelProviderMap, ModelProviders, aiproxyIdMap } from "./models/constants.js";
|
|
11
13
|
import { TemplateItemSchema, TemplateItemType, TemplateListSchema, TemplateListType } from "./workflows/schemas.js";
|
|
12
|
-
import { ToolTagsNameMap, ToolTagsType } from "./tools/constants.js";
|
|
14
|
+
import { PluginBaseS3Prefix, ToolTagsNameMap, ToolTagsType, UploadToolsS3Path } from "./tools/constants.js";
|
|
13
15
|
import { FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum, InputSchema, LLMModelTypeEnum, OutputSchema, OutputType, SecretInputItemSchema, SecretInputItemType, WorkflowIOValueTypeEnum } from "./tools/schemas/fastgpt.js";
|
|
14
|
-
export { type Cherrio2MdInput, type Cherrio2MdResult, EmbeddingModelItemSchema, type EventEmitter, type EventEnumType, type FileInput, FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum, I18nStringSchema, I18nStringStrictSchema, type I18nStringStrictType, type I18nStringType, InputSchema, LLMModelItemSchema, LLMModelTypeEnum, ListModelsSchema, type ListModelsType, ModelItemSchema, type ModelItemType, ModelTypeEnum, OutputSchema, type OutputType, RerankModelItemSchema, STTModelSchema, SecretInputItemSchema, type SecretInputItemType, StreamDataAnswerTypeEnum, StreamDataSchema, type StreamDataType, StreamMessageSchema, type StreamMessageType, StreamMessageTypeEnum, SystemVarSchema, type SystemVarType, TTSModelSchema, TemplateItemSchema, type TemplateItemType, TemplateListSchema, type TemplateListType, ToolConfigSchema, type ToolContextType, ToolDetailSchema, type ToolDetailType, type ToolHandlerFunctionType, ToolHandlerReturnSchema, type ToolHandlerReturnType, ToolSchema, ToolSetConfigSchema, ToolSetSchema, ToolSimpleSchema, type ToolSimpleType, ToolTagEnum, ToolTagsNameMap, type ToolTagsType, UnifiedToolSchema, VersionListItemSchema, type VersionListItemType, WorkflowIOValueTypeEnum, batch, catchError, defineTool, defineToolSet, delay, ensureDir, pkg, refreshDir, unpkg };
|
|
16
|
+
export { type AiproxyMapProviderType, type Cherrio2MdInput, type Cherrio2MdResult, type DatasetSourceConfig, DatasetSourceConfigSchema, type DatasetSourceId, DatasetSourceIdEnum, type DatasetSourceInfo, DatasetSourceInfoSchema, EmbeddingModelItemSchema, type EventEmitter, type EventEnumType, type FileContentResponse, FileContentResponseSchema, type FileInput, type FileItem, FileItemSchema, FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum, type FormFieldConfig, FormFieldConfigSchema, type FormFieldType, FormFieldTypeEnum, I18nStringSchema, I18nStringStrictSchema, type I18nStringStrictType, type I18nStringType, InputSchema, LLMModelItemSchema, LLMModelTypeEnum, ListModelsSchema, type ListModelsType, ModelItemSchema, type ModelItemType, ModelProviderMap, type ModelProviderMap as ModelProviderMapType, ModelProviders, ModelTypeEnum, OutputSchema, type OutputType, PluginBaseS3Prefix, type PluginDatasetSourceId, PluginDatasetSourceIds, RerankModelItemSchema, STTModelSchema, SecretInputItemSchema, type SecretInputItemType, StreamDataAnswerTypeEnum, StreamDataSchema, type StreamDataType, StreamMessageSchema, type StreamMessageType, StreamMessageTypeEnum, SystemVarSchema, type SystemVarType, TTSModelSchema, TemplateItemSchema, type TemplateItemType, TemplateListSchema, type TemplateListType, ToolConfigSchema, type ToolContextType, ToolDetailSchema, type ToolDetailType, type ToolHandlerFunctionType, ToolHandlerReturnSchema, type ToolHandlerReturnType, ToolSchema, ToolSetConfigSchema, ToolSetSchema, ToolSimpleSchema, type ToolSimpleType, ToolTagEnum, ToolTagsNameMap, type ToolTagsType, UnifiedToolSchema, UploadToolsS3Path, VersionListItemSchema, type VersionListItemType, WorkflowIOValueTypeEnum, aiproxyIdMap, batch, catchError, defineTool, defineToolSet, delay, ensureDir, pkg, refreshDir, unpkg };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ensureDir as e,refreshDir as t}from"./common/fs.js";import{batch as n,catchError as r,delay as i}from"./common/fn.js";import{pkg as a,unpkg as o}from"./common/zip.js";import{I18nStringSchema as s,I18nStringStrictSchema as c}from"./common/schemas/i18n.js";import{FlowNodeInputTypeEnum as l,FlowNodeOutputTypeEnum as u,InputSchema as d,LLMModelTypeEnum as f,OutputSchema as p,SecretInputItemSchema as m,WorkflowIOValueTypeEnum as h}from"./tools/schemas/fastgpt.js";import{ToolConfigSchema as g,ToolDetailSchema as _,ToolSchema as v,ToolSetConfigSchema as y,ToolSetSchema as b,ToolSimpleSchema as x,ToolTagEnum as S,UnifiedToolSchema as C,VersionListItemSchema as w}from"./tools/schemas/tool.js";import{defineTool as T,defineToolSet as E}from"./tools/helper.js";import{EmbeddingModelItemSchema as D,LLMModelItemSchema as O,ListModelsSchema as k,ModelItemSchema as A,ModelTypeEnum as j,RerankModelItemSchema as M,STTModelSchema as N,TTSModelSchema as P}from"./models/schemas.js";import{
|
|
1
|
+
import{ensureDir as e,refreshDir as t}from"./common/fs.js";import{batch as n,catchError as r,delay as i}from"./common/fn.js";import{pkg as a,unpkg as o}from"./common/zip.js";import{I18nStringSchema as s,I18nStringStrictSchema as c}from"./common/schemas/i18n.js";import{FlowNodeInputTypeEnum as l,FlowNodeOutputTypeEnum as u,InputSchema as d,LLMModelTypeEnum as f,OutputSchema as p,SecretInputItemSchema as m,WorkflowIOValueTypeEnum as h}from"./tools/schemas/fastgpt.js";import{ToolConfigSchema as g,ToolDetailSchema as _,ToolSchema as v,ToolSetConfigSchema as y,ToolSetSchema as b,ToolSimpleSchema as x,ToolTagEnum as S,UnifiedToolSchema as C,VersionListItemSchema as w}from"./tools/schemas/tool.js";import{defineTool as T,defineToolSet as E}from"./tools/helper.js";import{EmbeddingModelItemSchema as D,LLMModelItemSchema as O,ListModelsSchema as k,ModelItemSchema as A,ModelTypeEnum as j,RerankModelItemSchema as M,STTModelSchema as N,TTSModelSchema as P}from"./models/schemas.js";import{ModelProviderMap as F,ModelProviders as I,aiproxyIdMap as L}from"./models/constants.js";import{TemplateItemSchema as R,TemplateListSchema as z}from"./workflows/schemas.js";import{PluginBaseS3Prefix as B,ToolTagsNameMap as V,UploadToolsS3Path as H}from"./tools/constants.js";import{StreamDataAnswerTypeEnum as U,StreamDataSchema as W,StreamMessageSchema as G,StreamMessageTypeEnum as K,SystemVarSchema as q,ToolHandlerReturnSchema as J}from"./tools/schemas/req.js";import{DatasetSourceConfigSchema as Y,DatasetSourceIdEnum as X,DatasetSourceInfoSchema as Z,FileContentResponseSchema as Q,FileItemSchema as $,FormFieldConfigSchema as ee,FormFieldTypeEnum as te,PluginDatasetSourceIds as ne}from"./datasets/schemas.js";export{Y as DatasetSourceConfigSchema,X as DatasetSourceIdEnum,Z as DatasetSourceInfoSchema,D as EmbeddingModelItemSchema,Q as FileContentResponseSchema,$ as FileItemSchema,l as FlowNodeInputTypeEnum,u as FlowNodeOutputTypeEnum,ee as FormFieldConfigSchema,te as FormFieldTypeEnum,s as I18nStringSchema,c as I18nStringStrictSchema,d as InputSchema,O as LLMModelItemSchema,f as LLMModelTypeEnum,k as ListModelsSchema,A as ModelItemSchema,F as ModelProviderMap,I as ModelProviders,j as ModelTypeEnum,p as OutputSchema,B as PluginBaseS3Prefix,ne as PluginDatasetSourceIds,M as RerankModelItemSchema,N as STTModelSchema,m as SecretInputItemSchema,U as StreamDataAnswerTypeEnum,W as StreamDataSchema,G as StreamMessageSchema,K as StreamMessageTypeEnum,q as SystemVarSchema,P as TTSModelSchema,R as TemplateItemSchema,z as TemplateListSchema,g as ToolConfigSchema,_ as ToolDetailSchema,J as ToolHandlerReturnSchema,v as ToolSchema,y as ToolSetConfigSchema,b as ToolSetSchema,x as ToolSimpleSchema,S as ToolTagEnum,V as ToolTagsNameMap,C as UnifiedToolSchema,H as UploadToolsS3Path,w as VersionListItemSchema,h as WorkflowIOValueTypeEnum,L as aiproxyIdMap,n as batch,r as catchError,T as defineTool,E as defineToolSet,i as delay,e as ensureDir,a as pkg,t as refreshDir,o as unpkg};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { I18nStringStrictType } from "../common/schemas/i18n.js";
|
|
2
|
+
|
|
3
|
+
//#region src/models/constants.d.ts
|
|
4
|
+
type ModelProviderMap = {
|
|
5
|
+
[key: string]: I18nStringStrictType;
|
|
6
|
+
};
|
|
7
|
+
declare const ModelProviderMap: ModelProviderMap;
|
|
8
|
+
declare const ModelProviders: {
|
|
9
|
+
provider: string;
|
|
10
|
+
value: {
|
|
11
|
+
en: string;
|
|
12
|
+
'zh-CN': string;
|
|
13
|
+
'zh-Hant': string;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
type AiproxyMapProviderType = Record<number, {
|
|
17
|
+
name: I18nStringStrictType | string;
|
|
18
|
+
provider?: string;
|
|
19
|
+
avatar?: string;
|
|
20
|
+
}>;
|
|
21
|
+
declare const aiproxyIdMap: AiproxyMapProviderType;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { AiproxyMapProviderType, ModelProviderMap, ModelProviders, aiproxyIdMap };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={OpenAI:{en:`OpenAI`,"zh-CN":`OpenAI`,"zh-Hant":`OpenAI`},Claude:{en:`Claude`,"zh-CN":`Claude`,"zh-Hant":`Claude`},Gemini:{en:`Gemini`,"zh-CN":`Gemini`,"zh-Hant":`Gemini`},Meta:{en:`Meta`,"zh-CN":`Meta`,"zh-Hant":`Meta`},MistralAI:{en:`MistralAI`,"zh-CN":`MistralAI`,"zh-Hant":`MistralAI`},Grok:{en:`Grok`,"zh-CN":`Grok`,"zh-Hant":`Grok`},Groq:{en:`Groq`,"zh-CN":`Groq`,"zh-Hant":`Groq`},Jina:{en:`Jina`,"zh-CN":`Jina`,"zh-Hant":`Jina`},Qwen:{en:`Qwen`,"zh-CN":`通义千问`,"zh-Hant":`通義千問`},Doubao:{en:`Doubao`,"zh-CN":`豆包`,"zh-Hant":`豆包`},DeepSeek:{en:`DeepSeek`,"zh-CN":`深度求索`,"zh-Hant":`深度求索`},ChatGLM:{en:`ChatGLM`,"zh-CN":`ChatGLM`,"zh-Hant":`ChatGLM`},MiniMax:{en:`MiniMax`,"zh-CN":`MiniMax`,"zh-Hant":`MiniMax`},Moonshot:{en:`Moonshot`,"zh-CN":`月之暗面`,"zh-Hant":`月之暗面`},Ernie:{en:`Ernie`,"zh-CN":`文心一言`,"zh-Hant":`文心一言`},SparkDesk:{en:`SparkDesk`,"zh-CN":`讯飞星火`,"zh-Hant":`訊飛星火`},Hunyuan:{en:`Hunyuan`,"zh-CN":`混元`,"zh-Hant":`混元`},Baichuan:{en:`Baichuan`,"zh-CN":`百川智能`,"zh-Hant":`百川智能`},StepFun:{en:`StepFun`,"zh-CN":`阶跃星辰`,"zh-Hant":`階躍星辰`},ai360:{en:`ai360`,"zh-CN":`ai360`,"zh-Hant":`ai360`},Yi:{en:`Yi`,"zh-CN":`零一万物`,"zh-Hant":`零一萬物`},BAAI:{en:`BAAI`,"zh-CN":`北京智源`,"zh-Hant":`北京智源`},FishAudio:{en:`FishAudio`,"zh-CN":`FishAudio`,"zh-Hant":`FishAudio`},InternLM:{en:`InternLM`,"zh-CN":`书生大模型`,"zh-Hant":`書生大模型`},Moka:{en:`Moka`,"zh-CN":`Moka`,"zh-Hant":`Moka`},Ollama:{en:`Ollama`,"zh-CN":`Ollama`,"zh-Hant":`Ollama`},OpenRouter:{en:`OpenRouter`,"zh-CN":`OpenRouter`,"zh-Hant":`OpenRouter`},vertexai:{en:`vertexai`,"zh-CN":`vertexai`,"zh-Hant":`vertexai`},novita:{en:`novita`,"zh-CN":`novita`,"zh-Hant":`novita`},AliCloud:{en:`AliCloud`,"zh-CN":`阿里云`,"zh-Hant":`阿里雲`},Siliconflow:{en:`Siliconflow`,"zh-CN":`硅基流动`,"zh-Hant":`矽基流動`},PPIO:{en:`PPIO`,"zh-CN":`PPIO`,"zh-Hant":`PPIO`},Sangfor:{en:`Sangfor`,"zh-CN":`深信服`,"zh-Hant":`深信服`},Other:{en:`Other`,"zh-CN":`其他`,"zh-Hant":`其他`}},t=Object.entries(e).map(([e,t])=>({provider:e,value:t})),n={1:{name:`OpenAI`,provider:`OpenAI`},3:{name:{en:`微软 Azure`,"zh-CN":`Azure`,"zh-Hant":`Azure`},avatar:`model/azure`,provider:`OpenAI`},4:{name:`azure (弃用)`,avatar:`model/azure`,provider:`Other`},14:{name:`Anthropic`,provider:`Claude`},12:{name:`Google Gemini(OpenAI)`,provider:`Gemini`},24:{name:`Google Gemini`,provider:`Gemini`},28:{name:`Mistral AI`,provider:`MistralAI`},29:{name:`Groq`,provider:`Groq`},17:{name:{en:`Qwen`,"zh-CN":`阿里百炼`,"zh-Hant":`阿里百煉`},provider:`Qwen`},40:{name:{en:`Doubao`,"zh-CN":`火山引擎(豆包)`,"zh-Hant":`火山引擎(豆包)`},provider:`Doubao`},36:{name:`DeepSeek`,provider:`DeepSeek`},13:{name:{en:`Ernie V2`,"zh-CN":`百度智能云 V2`,"zh-Hant":`百度智能云 V2`},provider:`Ernie`},15:{name:{en:`Ernie`,"zh-CN":`百度智能云`,"zh-Hant":`百度智能云`},provider:`Ernie`},16:{name:{en:`ChatGLM`,"zh-CN":`智谱清言`,"zh-Hant":`智譜清言`},provider:`ChatGLM`},18:{name:{en:`SparkDesk`,"zh-CN":`讯飞星火`,"zh-Hant":`訊飛星火`},provider:`SparkDesk`},25:{name:{en:`Moonshot`,"zh-CN":`月之暗面`,"zh-Hant":`月之暗面`},provider:`Moonshot`},26:{name:{en:`Baichuan`,"zh-CN":`百川智能`,"zh-Hant":`百川智能`},provider:`Baichuan`},27:{name:`MiniMax`,provider:`MiniMax`},31:{name:{en:`Yi`,"zh-CN":`零一万物`,"zh-Hant":`零一萬物`},provider:`Yi`},32:{name:{en:`StepFun`,"zh-CN":`阶跃星辰`,"zh-Hant":`階躍星辰`},provider:`StepFun`},43:{name:{en:`Siliconflow`,"zh-CN":`硅基流动`,"zh-Hant":`矽基流動`},provider:`Siliconflow`},30:{name:`Ollama`,provider:`Ollama`},23:{name:{en:`Hunyuan`,"zh-CN":`腾讯混元`,"zh-Hant":`騰訊混元`},provider:`Hunyuan`},44:{name:{en:`Doubao Audio`,"zh-CN":`火山引擎(豆包音频)`,"zh-Hant":`火山引擎(豆包音频)`},provider:`Doubao`},33:{name:`AWS`,provider:`Other`,avatar:`model/aws`},35:{name:`Cohere`,provider:`Other`,avatar:`model/cohere`},37:{name:`Cloudflare`,provider:`Other`,avatar:`model/cloudflare`},20:{name:`OpenRouter`,provider:`OpenRouter`},47:{name:`JinaAI`,provider:`Jina`},19:{name:`ai360`,provider:`ai360`},42:{name:`vertexai`,provider:`vertexai`},41:{name:`novita`,provider:`novita`},45:{name:`Grok`,provider:`Grok`},46:{name:`Doc2X`,provider:`Other`,avatar:`plugins/doc2x`},34:{name:`Coze`,provider:`Other`,avatar:`model/coze`},48:{name:`Sangfor`,provider:`Sangfor`}};export{e as ModelProviderMap,t as ModelProviders,n as aiproxyIdMap};
|
|
@@ -68,5 +68,13 @@ type ToolTagsType = { [key in keyof typeof ToolTagEnum]: {
|
|
|
68
68
|
'zh-CN': string;
|
|
69
69
|
'zh-Hant': string;
|
|
70
70
|
} };
|
|
71
|
+
/**
|
|
72
|
+
* S3 路径:上传的工具存储路径
|
|
73
|
+
*/
|
|
74
|
+
declare const UploadToolsS3Path = "system/plugin/tools";
|
|
75
|
+
/**
|
|
76
|
+
* S3 路径:插件文件的基础前缀
|
|
77
|
+
*/
|
|
78
|
+
declare const PluginBaseS3Prefix = "system/plugin/files";
|
|
71
79
|
//#endregion
|
|
72
|
-
export { ToolTagsNameMap, ToolTagsType };
|
|
80
|
+
export { PluginBaseS3Prefix, ToolTagsNameMap, ToolTagsType, UploadToolsS3Path };
|
package/dist/tools/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ToolTagEnum as e}from"./schemas/tool.js";const t={[e.tools]:{en:`tools`,"zh-CN":`工具`,"zh-Hant":`工具`},[e.search]:{en:`search`,"zh-CN":`搜索`,"zh-Hant":`搜尋`},[e.multimodal]:{en:`multimodal`,"zh-CN":`多模态`,"zh-Hant":`多模態`},[e.communication]:{en:`communication`,"zh-CN":`通信`,"zh-Hant":`通訊`},[e.finance]:{en:`finance`,"zh-CN":`金融`,"zh-Hant":`金融`},[e.design]:{en:`design`,"zh-CN":`设计`,"zh-Hant":`設計`},[e.productivity]:{en:`productivity`,"zh-CN":`生产力`,"zh-Hant":`生產力`},[e.news]:{en:`news`,"zh-CN":`新闻`,"zh-Hant":`新聞`},[e.entertainment]:{en:`entertainment`,"zh-CN":`娱乐`,"zh-Hant":`娛樂`},[e.social]:{en:`social`,"zh-CN":`社交`,"zh-Hant":`社群`},[e.scientific]:{en:`scientific`,"zh-CN":`科学`,"zh-Hant":`科學`},[e.other]:{en:`other`,"zh-CN":`其他`,"zh-Hant":`其他`}}
|
|
1
|
+
import{ToolTagEnum as e}from"./schemas/tool.js";const t={[e.tools]:{en:`tools`,"zh-CN":`工具`,"zh-Hant":`工具`},[e.search]:{en:`search`,"zh-CN":`搜索`,"zh-Hant":`搜尋`},[e.multimodal]:{en:`multimodal`,"zh-CN":`多模态`,"zh-Hant":`多模態`},[e.communication]:{en:`communication`,"zh-CN":`通信`,"zh-Hant":`通訊`},[e.finance]:{en:`finance`,"zh-CN":`金融`,"zh-Hant":`金融`},[e.design]:{en:`design`,"zh-CN":`设计`,"zh-Hant":`設計`},[e.productivity]:{en:`productivity`,"zh-CN":`生产力`,"zh-Hant":`生產力`},[e.news]:{en:`news`,"zh-CN":`新闻`,"zh-Hant":`新聞`},[e.entertainment]:{en:`entertainment`,"zh-CN":`娱乐`,"zh-Hant":`娛樂`},[e.social]:{en:`social`,"zh-CN":`社交`,"zh-Hant":`社群`},[e.scientific]:{en:`scientific`,"zh-CN":`科学`,"zh-Hant":`科學`},[e.other]:{en:`other`,"zh-CN":`其他`,"zh-Hant":`其他`}},n=`system/plugin/tools`,r=`system/plugin/files`;export{r as PluginBaseS3Prefix,t as ToolTagsNameMap,n as UploadToolsS3Path};
|
package/dist/tools/helper.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare const exportTool: <I, O>({
|
|
|
16
16
|
OutputSchema: ZodType<O>;
|
|
17
17
|
config: ToolConfigType;
|
|
18
18
|
}) => {
|
|
19
|
-
handler: (props: I,
|
|
19
|
+
handler: (props: I, ctx: ToolContextType) => Promise<{
|
|
20
20
|
output: O;
|
|
21
21
|
error?: never;
|
|
22
22
|
} | {
|
|
@@ -29,8 +29,8 @@ declare const exportTool: <I, O>({
|
|
|
29
29
|
inputs: {
|
|
30
30
|
key: string;
|
|
31
31
|
label: string;
|
|
32
|
-
renderTypeList: ("
|
|
33
|
-
valueType: "string" | "number" | "boolean" | "object" | "
|
|
32
|
+
renderTypeList: ("custom" | "input" | "hidden" | "select" | "reference" | "textarea" | "numberInput" | "switch" | "multipleSelect" | "JSONEditor" | "addInputParam" | "selectApp" | "customVariable" | "selectLLMModel" | "settingLLMModel" | "selectDataset" | "selectDatasetParamsModal" | "settingDatasetQuotePrompt" | "fileSelect")[];
|
|
33
|
+
valueType: "string" | "number" | "boolean" | "object" | "any" | "selectApp" | "selectDataset" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
34
34
|
referencePlaceholder?: string | undefined;
|
|
35
35
|
placeholder?: string | undefined;
|
|
36
36
|
defaultValue?: any;
|
|
@@ -49,7 +49,7 @@ declare const exportTool: <I, O>({
|
|
|
49
49
|
inputList?: {
|
|
50
50
|
key: string;
|
|
51
51
|
label: string;
|
|
52
|
-
inputType: "input" | "
|
|
52
|
+
inputType: "input" | "select" | "numberInput" | "switch" | "secret";
|
|
53
53
|
description?: string | undefined;
|
|
54
54
|
required?: boolean | undefined;
|
|
55
55
|
defaultValue?: any;
|
|
@@ -74,9 +74,9 @@ declare const exportTool: <I, O>({
|
|
|
74
74
|
}[];
|
|
75
75
|
outputs: {
|
|
76
76
|
key: string;
|
|
77
|
-
valueType: "string" | "number" | "boolean" | "object" | "
|
|
77
|
+
valueType: "string" | "number" | "boolean" | "object" | "any" | "selectApp" | "selectDataset" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
78
78
|
id?: string | undefined;
|
|
79
|
-
type?: "hidden" | "
|
|
79
|
+
type?: "hidden" | "error" | "dynamic" | "source" | "static" | undefined;
|
|
80
80
|
valueDesc?: string | undefined;
|
|
81
81
|
value?: unknown;
|
|
82
82
|
label?: string | undefined;
|
|
@@ -86,12 +86,12 @@ declare const exportTool: <I, O>({
|
|
|
86
86
|
}[];
|
|
87
87
|
description?: string | undefined;
|
|
88
88
|
}[];
|
|
89
|
-
|
|
89
|
+
name: {
|
|
90
90
|
en: string;
|
|
91
91
|
'zh-CN'?: string | undefined;
|
|
92
92
|
'zh-Hant'?: string | undefined;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
description: {
|
|
95
95
|
en: string;
|
|
96
96
|
'zh-CN'?: string | undefined;
|
|
97
97
|
'zh-Hant'?: string | undefined;
|
|
@@ -100,11 +100,11 @@ declare const exportTool: <I, O>({
|
|
|
100
100
|
tags?: ("tools" | "search" | "multimodal" | "communication" | "finance" | "design" | "productivity" | "news" | "entertainment" | "social" | "scientific" | "other")[] | undefined;
|
|
101
101
|
icon?: string | undefined;
|
|
102
102
|
author?: string | undefined;
|
|
103
|
-
|
|
103
|
+
tutorialUrl?: string | undefined;
|
|
104
104
|
secretInputConfig?: {
|
|
105
105
|
key: string;
|
|
106
106
|
label: string;
|
|
107
|
-
inputType: "input" | "
|
|
107
|
+
inputType: "input" | "select" | "numberInput" | "switch" | "secret";
|
|
108
108
|
description?: string | undefined;
|
|
109
109
|
required?: boolean | undefined;
|
|
110
110
|
defaultValue?: any;
|
|
@@ -114,135 +114,33 @@ declare const exportTool: <I, O>({
|
|
|
114
114
|
}[] | undefined;
|
|
115
115
|
}[] | undefined;
|
|
116
116
|
parentId?: string | undefined;
|
|
117
|
-
|
|
118
|
-
etag?: string | undefined;
|
|
117
|
+
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
119
118
|
};
|
|
120
119
|
declare const exportToolSet: ({
|
|
121
120
|
config
|
|
122
121
|
}: {
|
|
123
122
|
config: ToolSetConfigType;
|
|
124
123
|
}) => {
|
|
125
|
-
|
|
126
|
-
toolId: string;
|
|
127
|
-
name: {
|
|
128
|
-
en: string;
|
|
129
|
-
'zh-CN'?: string | undefined;
|
|
130
|
-
'zh-Hant'?: string | undefined;
|
|
131
|
-
};
|
|
132
|
-
description: {
|
|
133
|
-
en: string;
|
|
134
|
-
'zh-CN'?: string | undefined;
|
|
135
|
-
'zh-Hant'?: string | undefined;
|
|
136
|
-
};
|
|
137
|
-
toolDescription: string;
|
|
138
|
-
icon: string;
|
|
139
|
-
handler: any;
|
|
140
|
-
filename: string;
|
|
141
|
-
parentId?: string | undefined;
|
|
142
|
-
versionList?: {
|
|
143
|
-
value: string;
|
|
144
|
-
inputs: {
|
|
145
|
-
key: string;
|
|
146
|
-
label: string;
|
|
147
|
-
renderTypeList: ("reference" | "input" | "textarea" | "numberInput" | "switch" | "select" | "multipleSelect" | "JSONEditor" | "addInputParam" | "selectApp" | "customVariable" | "selectLLMModel" | "settingLLMModel" | "selectDataset" | "selectDatasetParamsModal" | "settingDatasetQuotePrompt" | "hidden" | "custom" | "fileSelect")[];
|
|
148
|
-
valueType: "string" | "number" | "boolean" | "object" | "selectApp" | "selectDataset" | "any" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
149
|
-
referencePlaceholder?: string | undefined;
|
|
150
|
-
placeholder?: string | undefined;
|
|
151
|
-
defaultValue?: any;
|
|
152
|
-
selectedTypeIndex?: number | undefined;
|
|
153
|
-
valueDesc?: string | undefined;
|
|
154
|
-
value?: unknown;
|
|
155
|
-
description?: string | undefined;
|
|
156
|
-
required?: boolean | undefined;
|
|
157
|
-
toolDescription?: string | undefined;
|
|
158
|
-
canEdit?: boolean | undefined;
|
|
159
|
-
isPro?: boolean | undefined;
|
|
160
|
-
maxLength?: number | undefined;
|
|
161
|
-
canSelectFile?: boolean | undefined;
|
|
162
|
-
canSelectImg?: boolean | undefined;
|
|
163
|
-
maxFiles?: number | undefined;
|
|
164
|
-
inputList?: {
|
|
165
|
-
key: string;
|
|
166
|
-
label: string;
|
|
167
|
-
inputType: "input" | "numberInput" | "switch" | "select" | "secret";
|
|
168
|
-
description?: string | undefined;
|
|
169
|
-
required?: boolean | undefined;
|
|
170
|
-
defaultValue?: any;
|
|
171
|
-
list?: {
|
|
172
|
-
label: string;
|
|
173
|
-
value: string;
|
|
174
|
-
}[] | undefined;
|
|
175
|
-
}[] | undefined;
|
|
176
|
-
llmModelType?: "all" | "classify" | "extractFields" | "toolCall" | undefined;
|
|
177
|
-
list?: {
|
|
178
|
-
label: string;
|
|
179
|
-
value: string;
|
|
180
|
-
}[] | undefined;
|
|
181
|
-
markList?: {
|
|
182
|
-
label: string;
|
|
183
|
-
value: number;
|
|
184
|
-
}[] | undefined;
|
|
185
|
-
step?: number | undefined;
|
|
186
|
-
max?: number | undefined;
|
|
187
|
-
min?: number | undefined;
|
|
188
|
-
precision?: number | undefined;
|
|
189
|
-
}[];
|
|
190
|
-
outputs: {
|
|
191
|
-
key: string;
|
|
192
|
-
valueType: "string" | "number" | "boolean" | "object" | "selectApp" | "selectDataset" | "any" | "arrayString" | "arrayNumber" | "arrayBoolean" | "arrayObject" | "arrayAny" | "chatHistory" | "datasetQuote" | "dynamic";
|
|
193
|
-
id?: string | undefined;
|
|
194
|
-
type?: "hidden" | "dynamic" | "source" | "static" | "error" | undefined;
|
|
195
|
-
valueDesc?: string | undefined;
|
|
196
|
-
value?: unknown;
|
|
197
|
-
label?: string | undefined;
|
|
198
|
-
description?: string | undefined;
|
|
199
|
-
defaultValue?: any;
|
|
200
|
-
required?: boolean | undefined;
|
|
201
|
-
}[];
|
|
202
|
-
description?: string | undefined;
|
|
203
|
-
}[] | undefined;
|
|
204
|
-
tags?: ("tools" | "search" | "multimodal" | "communication" | "finance" | "design" | "productivity" | "news" | "entertainment" | "social" | "scientific" | "other")[] | undefined;
|
|
205
|
-
author?: string | undefined;
|
|
206
|
-
tutorialUrl?: string | undefined;
|
|
207
|
-
readmeUrl?: string | undefined;
|
|
208
|
-
secretInputConfig?: {
|
|
209
|
-
key: string;
|
|
210
|
-
label: string;
|
|
211
|
-
inputType: "input" | "numberInput" | "switch" | "select" | "secret";
|
|
212
|
-
description?: string | undefined;
|
|
213
|
-
required?: boolean | undefined;
|
|
214
|
-
defaultValue?: any;
|
|
215
|
-
list?: {
|
|
216
|
-
label: string;
|
|
217
|
-
value: string;
|
|
218
|
-
}[] | undefined;
|
|
219
|
-
}[] | undefined;
|
|
220
|
-
etag?: string | undefined;
|
|
221
|
-
}[];
|
|
222
|
-
description: {
|
|
124
|
+
name: {
|
|
223
125
|
en: string;
|
|
224
126
|
'zh-CN'?: string | undefined;
|
|
225
127
|
'zh-Hant'?: string | undefined;
|
|
226
128
|
};
|
|
227
|
-
|
|
129
|
+
description: {
|
|
228
130
|
en: string;
|
|
229
131
|
'zh-CN'?: string | undefined;
|
|
230
132
|
'zh-Hant'?: string | undefined;
|
|
231
133
|
};
|
|
232
|
-
filename: string;
|
|
233
|
-
tutorialUrl?: string | undefined;
|
|
234
|
-
readmeUrl?: string | undefined;
|
|
235
|
-
etag?: string | undefined;
|
|
236
134
|
toolId?: string | undefined;
|
|
237
135
|
toolDescription?: string | undefined;
|
|
238
136
|
tags?: ("tools" | "search" | "multimodal" | "communication" | "finance" | "design" | "productivity" | "news" | "entertainment" | "social" | "scientific" | "other")[] | undefined;
|
|
239
137
|
icon?: string | undefined;
|
|
240
138
|
author?: string | undefined;
|
|
241
|
-
|
|
139
|
+
tutorialUrl?: string | undefined;
|
|
242
140
|
secretInputConfig?: {
|
|
243
141
|
key: string;
|
|
244
142
|
label: string;
|
|
245
|
-
inputType: "input" | "
|
|
143
|
+
inputType: "input" | "select" | "numberInput" | "switch" | "secret";
|
|
246
144
|
description?: string | undefined;
|
|
247
145
|
required?: boolean | undefined;
|
|
248
146
|
defaultValue?: any;
|
|
@@ -251,6 +149,8 @@ declare const exportToolSet: ({
|
|
|
251
149
|
value: string;
|
|
252
150
|
}[] | undefined;
|
|
253
151
|
}[] | undefined;
|
|
152
|
+
readmeUrl?: string | undefined;
|
|
153
|
+
permission?: ("userInfo:read" | "teamInfo:read" | "model:read" | "dataset:read")[] | undefined;
|
|
254
154
|
};
|
|
255
155
|
//#endregion
|
|
256
156
|
export { defineTool, defineToolSet, exportTool, exportToolSet };
|