-
Notifications
You must be signed in to change notification settings - Fork 94
/
文字迭代输入.json
318 lines (318 loc) · 6.48 KB
/
文字迭代输入.json
1
2
3
4
5
6
7
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
{
"last_node_id": 32,
"last_link_id": 46,
"nodes": [
{
"id": 11,
"type": "show_text_party",
"pos": [
1364,
262
],
"size": {
"0": 454.6876220703125,
"1": 290.2985534667969
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "text",
"type": "STRING",
"link": 36,
"widget": {
"name": "text"
},
"label": "text"
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null,
"shape": 6,
"label": "STRING"
}
],
"properties": {
"Node name for S&R": "show_text_party"
},
"widgets_values": [
"",
"## Features\n1. You can right-click within the comfyui interface and select `llm` from the context menu to find the nodes of this project. [How to use nodes](how_to_use_nodes_ZH.md)\n2. Supports OpenAI's API-driven approach and allows custom base_url, enabling the use of relay APIs to drive the LLM node. If you are using other large model interfaces, you can use [openai-style-api](https://github.com/tian-minghui/openai-style-api) to convert them into OpenAI interface format. For local large models, please select the local large model node; currently, GLM and llama are adapted, but llama cannot use tool calls because the native llama does not include this feature.\n3. The base_url must end with `/v1/`.\n4. Supports importing various types of file formats into the LLM node, allowing the LLM to answer based on file content through RAG technology. Currently supported file types include: .docx, .xlsx, .csv, .txt, .py, .js, .java, .c, .cpp, .html, .css, .sql, .r, .swift.\n5. By combining tool nodes, multiple tools can be passed into the LLM node, and by combining file nodes, multiple files can be passed into the LLM node."
]
},
{
"id": 32,
"type": "text_iterator",
"pos": [
575,
364
],
"size": {
"0": 315,
"1": 130
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "file_content",
"type": "STRING",
"link": 44,
"widget": {
"name": "file_content"
}
}
],
"outputs": [
{
"name": "file_content",
"type": "STRING",
"links": [
45
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "text_iterator"
},
"widgets_values": [
"",
true,
false,
512,
0
]
},
{
"id": 20,
"type": "LLM_api_loader",
"pos": [
583,
184
],
"size": {
"0": 315,
"1": 106
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "model",
"type": "CUSTOM",
"links": [
34
],
"shape": 3,
"label": "model",
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LLM_api_loader"
},
"widgets_values": [
"deepseek-chat",
"",
""
]
},
{
"id": 31,
"type": "load_file",
"pos": [
224,
364
],
"size": {
"0": 315,
"1": 106
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "file_content",
"type": "STRING",
"links": [
44
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "load_file"
},
"widgets_values": [
"",
"README_ZH.txt",
true
]
},
{
"id": 23,
"type": "LLM",
"pos": [
940,
260
],
"size": {
"0": 401.7856750488281,
"1": 469.7105407714844
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "CUSTOM",
"link": 34
},
{
"name": "images",
"type": "IMAGE",
"link": null
},
{
"name": "system_prompt_input",
"type": "STRING",
"link": null,
"widget": {
"name": "system_prompt_input"
}
},
{
"name": "user_prompt_input",
"type": "STRING",
"link": null,
"widget": {
"name": "user_prompt_input"
}
},
{
"name": "tools",
"type": "STRING",
"link": null,
"widget": {
"name": "tools"
}
},
{
"name": "file_content",
"type": "STRING",
"link": 45,
"widget": {
"name": "file_content"
}
}
],
"outputs": [
{
"name": "assistant_response",
"type": "STRING",
"links": [
36
],
"shape": 3,
"slot_index": 0
},
{
"name": "history",
"type": "STRING",
"links": null,
"shape": 3
},
{
"name": "tool",
"type": "STRING",
"links": null,
"shape": 3
},
{
"name": "image",
"type": "IMAGE",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LLM"
},
"widgets_values": [
"",
"帮我翻译一下文件中的文字到英文",
0.7,
"disable",
"enable",
"enable",
"enable",
1920,
"",
"",
"",
"",
"",
100,
""
]
}
],
"links": [
[
34,
20,
0,
23,
0,
"CUSTOM"
],
[
36,
23,
0,
11,
0,
"STRING"
],
[
44,
31,
0,
32,
0,
"STRING"
],
[
45,
32,
0,
23,
5,
"STRING"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.8264462809917354,
"offset": {
"0": -234.70541907156766,
"1": 53.15784824120775
}
}
},
"version": 0.4
}