@shenghuabi/workflow 1.1.1 → 1.1.3
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/index.js +72 -111
- package/index.js.map +2 -2
- package/index.mjs +73 -116
- package/index.mjs.map +2 -2
- package/inline/node/chat/chat.node.define.d.ts +207 -159
- package/inline/node/chat/main/index.d.ts +205 -157
- package/package.json +2 -2
- package/share/type.d.ts +0 -3
- package/webview/index.js +68 -108
- package/webview/index.js.map +2 -2
- package/webview/index.mjs +69 -113
- package/webview/index.mjs.map +2 -2
|
@@ -2,168 +2,216 @@ import * as v from 'valibot';
|
|
|
2
2
|
export declare const ResponseList: readonly ["json", "markdown", "yaml"];
|
|
3
3
|
export declare const ResponseFormat: readonly ["text", "json_object", "json_schema"];
|
|
4
4
|
export type ResponseType = (typeof ResponseList)[number];
|
|
5
|
-
export declare const CHAT_NODE_DEFINE: v.
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly
|
|
38
|
-
|
|
39
|
-
readonly format: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "选中后会尝试使用yaml解析为对象,再序列化为对应的响应类型">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
40
|
-
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "问题">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
41
|
-
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
42
|
-
format: boolean;
|
|
43
|
-
value: string;
|
|
44
|
-
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
45
|
-
readonly output: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
46
|
-
readonly format: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "是否需要格式化">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
47
|
-
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "回答">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
48
|
-
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
49
|
-
format: boolean;
|
|
50
|
-
value: string;
|
|
51
|
-
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
52
|
-
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
53
|
-
input: {
|
|
54
|
-
format: boolean;
|
|
55
|
-
value: string;
|
|
56
|
-
};
|
|
57
|
-
output: {
|
|
58
|
-
format: boolean;
|
|
59
|
-
value: string;
|
|
60
|
-
};
|
|
61
|
-
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>, undefined>, readonly []>, v.TitleAction<{
|
|
62
|
-
input: {
|
|
63
|
-
format: boolean;
|
|
64
|
-
value: string;
|
|
65
|
-
};
|
|
66
|
-
output: {
|
|
67
|
-
format: boolean;
|
|
68
|
-
value: string;
|
|
69
|
-
};
|
|
70
|
-
}[], "用例">, v.DescriptionAction<{
|
|
71
|
-
input: {
|
|
72
|
-
format: boolean;
|
|
73
|
-
value: string;
|
|
74
|
-
};
|
|
75
|
-
output: {
|
|
76
|
-
format: boolean;
|
|
77
|
-
value: string;
|
|
78
|
-
};
|
|
79
|
-
}[], "回答问题之前,会参考定义的用例格式进行回复,用于规范回答">]>;
|
|
5
|
+
export declare const CHAT_NODE_DEFINE: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
6
|
+
readonly llm: v.OptionalSchema<v.SchemaWithPipe<readonly [v.IntersectSchema<[v.SchemaWithPipe<readonly [v.IntersectSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
7
|
+
readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "预定义模型配置">, import("@piying/valibot-visit").DefineTypeAction<string | undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
8
|
+
readonly model: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "模型">]>;
|
|
9
|
+
readonly baseURL: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "地址">]>;
|
|
10
|
+
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
model?: string | undefined;
|
|
13
|
+
baseURL?: string | undefined;
|
|
14
|
+
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>], undefined>, v.TitleAction<{
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
model?: string | undefined;
|
|
17
|
+
baseURL?: string | undefined;
|
|
18
|
+
}, string>, import("@piying/valibot-visit").VirtualGroupAction<{
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
model?: string | undefined;
|
|
21
|
+
baseURL?: string | undefined;
|
|
22
|
+
}>]>], undefined>, import("@piying/valibot-visit").VirtualGroupAction<{
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
model?: string | undefined;
|
|
25
|
+
baseURL?: string | undefined;
|
|
26
|
+
}>, import("@piying/valibot-visit").DefineTypeAction<{
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
model?: string | undefined;
|
|
29
|
+
baseURL?: string | undefined;
|
|
30
|
+
}>]>, undefined>;
|
|
31
|
+
/** 处理时解析 */
|
|
32
|
+
readonly responseFormat: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["text", "json_object", "json_schema"], undefined>, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "text" | "json_schema" | "json_object" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>, v.TitleAction<"text" | "json_schema" | "json_object" | undefined, "响应格式">]>;
|
|
33
|
+
/** 处理后解析 */
|
|
34
|
+
readonly parseBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["json", "markdown", "yaml"], undefined>, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "json" | "markdown" | "yaml" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>, v.TitleAction<"json" | "markdown" | "yaml" | undefined, "返回解析">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", "json" | "markdown" | "yaml" | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
35
|
+
readonly examples: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
36
|
+
readonly input: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
37
|
+
readonly format: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "选中后会尝试使用yaml解析为对象,再序列化为对应的响应类型">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
38
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "问题">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
80
39
|
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
model?: string | undefined;
|
|
84
|
-
baseURL?: string | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
responseFormat?: "text" | "json_schema" | "json_object" | undefined;
|
|
87
|
-
parseBy?: "json" | "markdown" | "yaml" | undefined;
|
|
88
|
-
examples: {
|
|
89
|
-
input: {
|
|
90
|
-
format: boolean;
|
|
91
|
-
value: string;
|
|
92
|
-
};
|
|
93
|
-
output: {
|
|
94
|
-
format: boolean;
|
|
95
|
-
value: string;
|
|
96
|
-
};
|
|
97
|
-
}[];
|
|
98
|
-
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
99
|
-
llm?: {
|
|
100
|
-
name?: string | undefined;
|
|
101
|
-
model?: string | undefined;
|
|
102
|
-
baseURL?: string | undefined;
|
|
103
|
-
} | undefined;
|
|
104
|
-
responseFormat?: "text" | "json_schema" | "json_object" | undefined;
|
|
105
|
-
parseBy?: "json" | "markdown" | "yaml" | undefined;
|
|
106
|
-
examples: {
|
|
107
|
-
input: {
|
|
108
|
-
format: boolean;
|
|
109
|
-
value: string;
|
|
110
|
-
};
|
|
111
|
-
output: {
|
|
112
|
-
format: boolean;
|
|
113
|
-
value: string;
|
|
114
|
-
};
|
|
115
|
-
}[];
|
|
40
|
+
format: boolean;
|
|
41
|
+
value: string;
|
|
116
42
|
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
117
|
-
readonly
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
43
|
+
readonly output: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
44
|
+
readonly format: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "是否需要格式化">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", boolean, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
45
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "回答">, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", string, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
46
|
+
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
47
|
+
format: boolean;
|
|
48
|
+
value: string;
|
|
49
|
+
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|
|
50
|
+
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
51
|
+
input: {
|
|
52
|
+
format: boolean;
|
|
53
|
+
value: string;
|
|
54
|
+
};
|
|
55
|
+
output: {
|
|
56
|
+
format: boolean;
|
|
57
|
+
value: string;
|
|
58
|
+
};
|
|
59
|
+
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>, undefined>, readonly []>, v.TitleAction<{
|
|
60
|
+
input: {
|
|
61
|
+
format: boolean;
|
|
62
|
+
value: string;
|
|
63
|
+
};
|
|
64
|
+
output: {
|
|
65
|
+
format: boolean;
|
|
66
|
+
value: string;
|
|
67
|
+
};
|
|
68
|
+
}[], "用例">, v.DescriptionAction<{
|
|
69
|
+
input: {
|
|
70
|
+
format: boolean;
|
|
71
|
+
value: string;
|
|
72
|
+
};
|
|
73
|
+
output: {
|
|
74
|
+
format: boolean;
|
|
75
|
+
value: string;
|
|
76
|
+
};
|
|
77
|
+
}[], "回答问题之前,会参考定义的用例格式进行回复,用于规范回答">]>;
|
|
78
|
+
readonly value: v.SchemaWithPipe<readonly [v.CustomSchema<({
|
|
79
|
+
role: "system";
|
|
80
|
+
content: {
|
|
81
|
+
text: string;
|
|
82
|
+
type: "text";
|
|
83
|
+
}[];
|
|
84
|
+
} | {
|
|
85
|
+
role: "user";
|
|
86
|
+
content: ({
|
|
87
|
+
text: string;
|
|
88
|
+
type: "text";
|
|
123
89
|
} | {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
90
|
+
image_url: {
|
|
91
|
+
url: string;
|
|
92
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
93
|
+
};
|
|
94
|
+
type: "image_url";
|
|
95
|
+
})[];
|
|
96
|
+
} | {
|
|
97
|
+
role: "assistant";
|
|
98
|
+
content: {
|
|
99
|
+
text: string;
|
|
100
|
+
type: "text";
|
|
101
|
+
}[];
|
|
102
|
+
thinkContent?: string | undefined;
|
|
103
|
+
})[], undefined>, import("@piying/valibot-visit").DefineTypeAction<({
|
|
104
|
+
role: "system";
|
|
105
|
+
content: {
|
|
106
|
+
text: string;
|
|
107
|
+
type: "text";
|
|
108
|
+
}[];
|
|
109
|
+
} | {
|
|
110
|
+
role: "user";
|
|
111
|
+
content: ({
|
|
112
|
+
text: string;
|
|
113
|
+
type: "text";
|
|
135
114
|
} | {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
115
|
+
image_url: {
|
|
116
|
+
url: string;
|
|
117
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
118
|
+
};
|
|
119
|
+
type: "image_url";
|
|
120
|
+
})[];
|
|
121
|
+
} | {
|
|
122
|
+
role: "assistant";
|
|
123
|
+
content: {
|
|
124
|
+
text: string;
|
|
125
|
+
type: "text";
|
|
126
|
+
}[];
|
|
127
|
+
thinkContent?: string | undefined;
|
|
128
|
+
})[]>]>;
|
|
129
|
+
}, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
130
|
+
llm?: {
|
|
131
|
+
name?: string | undefined;
|
|
132
|
+
model?: string | undefined;
|
|
133
|
+
baseURL?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
responseFormat?: "text" | "json_schema" | "json_object" | undefined;
|
|
136
|
+
parseBy?: "json" | "markdown" | "yaml" | undefined;
|
|
137
|
+
examples: {
|
|
138
|
+
input: {
|
|
139
|
+
format: boolean;
|
|
140
|
+
value: string;
|
|
141
|
+
};
|
|
142
|
+
output: {
|
|
143
|
+
format: boolean;
|
|
144
|
+
value: string;
|
|
145
|
+
};
|
|
146
|
+
}[];
|
|
147
|
+
value: ({
|
|
148
|
+
role: "system";
|
|
149
|
+
content: {
|
|
150
|
+
text: string;
|
|
151
|
+
type: "text";
|
|
152
|
+
}[];
|
|
153
|
+
} | {
|
|
154
|
+
role: "user";
|
|
155
|
+
content: ({
|
|
156
|
+
text: string;
|
|
157
|
+
type: "text";
|
|
148
158
|
} | {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
image_url: {
|
|
160
|
+
url: string;
|
|
161
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
162
|
+
};
|
|
163
|
+
type: "image_url";
|
|
164
|
+
})[];
|
|
165
|
+
} | {
|
|
166
|
+
role: "assistant";
|
|
167
|
+
content: {
|
|
168
|
+
text: string;
|
|
169
|
+
type: "text";
|
|
170
|
+
}[];
|
|
171
|
+
thinkContent?: string | undefined;
|
|
172
|
+
})[];
|
|
173
|
+
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
|
|
174
|
+
llm?: {
|
|
175
|
+
name?: string | undefined;
|
|
176
|
+
model?: string | undefined;
|
|
177
|
+
baseURL?: string | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
responseFormat?: "text" | "json_schema" | "json_object" | undefined;
|
|
180
|
+
parseBy?: "json" | "markdown" | "yaml" | undefined;
|
|
181
|
+
examples: {
|
|
182
|
+
input: {
|
|
183
|
+
format: boolean;
|
|
184
|
+
value: string;
|
|
185
|
+
};
|
|
186
|
+
output: {
|
|
187
|
+
format: boolean;
|
|
188
|
+
value: string;
|
|
189
|
+
};
|
|
190
|
+
}[];
|
|
191
|
+
value: ({
|
|
192
|
+
role: "system";
|
|
193
|
+
content: {
|
|
194
|
+
text: string;
|
|
195
|
+
type: "text";
|
|
196
|
+
}[];
|
|
197
|
+
} | {
|
|
198
|
+
role: "user";
|
|
199
|
+
content: ({
|
|
200
|
+
text: string;
|
|
201
|
+
type: "text";
|
|
160
202
|
} | {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
203
|
+
image_url: {
|
|
204
|
+
url: string;
|
|
205
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
206
|
+
};
|
|
207
|
+
type: "image_url";
|
|
208
|
+
})[];
|
|
209
|
+
} | {
|
|
210
|
+
role: "assistant";
|
|
211
|
+
content: {
|
|
212
|
+
text: string;
|
|
213
|
+
type: "text";
|
|
214
|
+
}[];
|
|
215
|
+
thinkContent?: string | undefined;
|
|
216
|
+
})[];
|
|
217
|
+
}, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
|