@shenghuabi/workflow 1.1.2 → 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.
@@ -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.LooseObjectSchema<{
6
- readonly data: v.LooseObjectSchema<{
7
- readonly config: v.SchemaWithPipe<readonly [v.ObjectSchema<{
8
- readonly llm: v.OptionalSchema<v.SchemaWithPipe<readonly [v.IntersectSchema<[v.SchemaWithPipe<readonly [v.IntersectSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
9
- 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>]>;
10
- readonly model: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "模型">]>;
11
- readonly baseURL: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "地址">]>;
12
- }, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
13
- name?: string | undefined;
14
- model?: string | undefined;
15
- baseURL?: string | undefined;
16
- }, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>], undefined>, v.TitleAction<{
17
- name?: string | undefined;
18
- model?: string | undefined;
19
- baseURL?: string | undefined;
20
- }, string>, import("@piying/valibot-visit").VirtualGroupAction<{
21
- name?: string | undefined;
22
- model?: string | undefined;
23
- baseURL?: string | undefined;
24
- }>]>], undefined>, import("@piying/valibot-visit").VirtualGroupAction<{
25
- name?: string | undefined;
26
- model?: string | undefined;
27
- baseURL?: string | undefined;
28
- }>, import("@piying/valibot-visit").DefineTypeAction<{
29
- name?: string | undefined;
30
- model?: string | undefined;
31
- baseURL?: string | undefined;
32
- }>]>, undefined>;
33
- /** 处理时解析 */
34
- 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, "响应格式">]>;
35
- /** 处理后解析 */
36
- 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>]>;
37
- readonly examples: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
38
- readonly input: v.SchemaWithPipe<readonly [v.ObjectSchema<{
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
- llm?: {
82
- name?: string | undefined;
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 value: v.SchemaWithPipe<readonly [v.CustomSchema<({
118
- role: "system";
119
- content: {
120
- text: string;
121
- type: "text";
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
- role: "user";
125
- content: ({
126
- text: string;
127
- type: "text";
128
- } | {
129
- image_url: {
130
- url: string;
131
- detail?: "auto" | "low" | "high" | undefined;
132
- };
133
- type: "image_url";
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
- role: "assistant";
137
- content: {
138
- text: string;
139
- type: "text";
140
- }[];
141
- thinkContent?: string | undefined;
142
- })[], undefined>, import("@piying/valibot-visit").DefineTypeAction<({
143
- role: "system";
144
- content: {
145
- text: string;
146
- type: "text";
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
- role: "user";
150
- content: ({
151
- text: string;
152
- type: "text";
153
- } | {
154
- image_url: {
155
- url: string;
156
- detail?: "auto" | "low" | "high" | undefined;
157
- };
158
- type: "image_url";
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
- role: "assistant";
162
- content: {
163
- text: string;
164
- type: "text";
165
- }[];
166
- thinkContent?: string | undefined;
167
- })[]>]>;
168
- }, undefined>;
169
- }, undefined>;
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>]>;