Skip to content

Commit 38791f9

Browse files
committed
update marketplace llmchain templates
1 parent cea1177 commit 38791f9

9 files changed

+1671
-706
lines changed

packages/server/marketplaces/chatflows/Antonym.json

+21-13
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"data": {
1414
"id": "fewShotPromptTemplate_1",
1515
"label": "Few Shot Prompt Template",
16-
"name": "fewShotPromptTemplate",
1716
"version": 1,
17+
"name": "fewShotPromptTemplate",
1818
"type": "FewShotPromptTemplate",
1919
"baseClasses": ["FewShotPromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
2020
"category": "Prompts",
@@ -115,8 +115,8 @@
115115
"data": {
116116
"id": "promptTemplate_0",
117117
"label": "Prompt Template",
118-
"name": "promptTemplate",
119118
"version": 1,
119+
"name": "promptTemplate",
120120
"type": "PromptTemplate",
121121
"baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
122122
"category": "Prompts",
@@ -165,7 +165,7 @@
165165
},
166166
{
167167
"width": 300,
168-
"height": 523,
168+
"height": 574,
169169
"id": "chatOpenAI_0",
170170
"position": {
171171
"x": 1226.7977900193628,
@@ -175,8 +175,8 @@
175175
"data": {
176176
"id": "chatOpenAI_0",
177177
"label": "ChatOpenAI",
178-
"name": "chatOpenAI",
179178
"version": 2,
179+
"name": "chatOpenAI",
180180
"type": "ChatOpenAI",
181181
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
182182
"category": "Chat Models",
@@ -327,20 +327,20 @@
327327
},
328328
{
329329
"width": 300,
330-
"height": 405,
330+
"height": 456,
331331
"id": "llmChain_0",
332332
"position": {
333-
"x": 1573.7490072386481,
334-
"y": 429.1905949837192
333+
"x": 1609.3428158423485,
334+
"y": 409.3763727612179
335335
},
336336
"type": "customNode",
337337
"data": {
338338
"id": "llmChain_0",
339339
"label": "LLM Chain",
340+
"version": 3,
340341
"name": "llmChain",
341-
"version": 1,
342342
"type": "LLMChain",
343-
"baseClasses": ["LLMChain", "BaseChain"],
343+
"baseClasses": ["LLMChain", "BaseChain", "Runnable"],
344344
"category": "Chains",
345345
"description": "Chain to run queries against LLMs",
346346
"inputParams": [
@@ -365,11 +365,19 @@
365365
"name": "prompt",
366366
"type": "BasePromptTemplate",
367367
"id": "llmChain_0-input-prompt-BasePromptTemplate"
368+
},
369+
{
370+
"label": "Output Parser",
371+
"name": "outputParser",
372+
"type": "BaseLLMOutputParser",
373+
"optional": true,
374+
"id": "llmChain_0-input-outputParser-BaseLLMOutputParser"
368375
}
369376
],
370377
"inputs": {
371378
"model": "{{chatOpenAI_0.data.instance}}",
372379
"prompt": "{{fewShotPromptTemplate_1.data.instance}}",
380+
"outputParser": "",
373381
"chainName": ""
374382
},
375383
"outputAnchors": [
@@ -379,10 +387,10 @@
379387
"type": "options",
380388
"options": [
381389
{
382-
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain",
390+
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable",
383391
"name": "llmChain",
384392
"label": "LLM Chain",
385-
"type": "LLMChain | BaseChain"
393+
"type": "LLMChain | BaseChain | Runnable"
386394
},
387395
{
388396
"id": "llmChain_0-output-outputPrediction-string|json",
@@ -401,8 +409,8 @@
401409
},
402410
"selected": false,
403411
"positionAbsolute": {
404-
"x": 1573.7490072386481,
405-
"y": 429.1905949837192
412+
"x": 1609.3428158423485,
413+
"y": 409.3763727612179
406414
},
407415
"dragging": false
408416
}

packages/server/marketplaces/chatflows/HuggingFace LLM Chain.json

+102-94
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,6 @@
11
{
22
"description": "Simple LLM Chain using HuggingFace Inference API on falcon-7b-instruct model",
33
"nodes": [
4-
{
5-
"width": 300,
6-
"height": 405,
7-
"id": "llmChain_1",
8-
"position": {
9-
"x": 970.9254258940236,
10-
"y": 320.56761595884564
11-
},
12-
"type": "customNode",
13-
"data": {
14-
"id": "llmChain_1",
15-
"label": "LLM Chain",
16-
"name": "llmChain",
17-
"version": 1,
18-
"type": "LLMChain",
19-
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
20-
"category": "Chains",
21-
"description": "Chain to run queries against LLMs",
22-
"inputParams": [
23-
{
24-
"label": "Chain Name",
25-
"name": "chainName",
26-
"type": "string",
27-
"placeholder": "Name Your Chain",
28-
"optional": true,
29-
"id": "llmChain_1-input-chainName-string"
30-
}
31-
],
32-
"inputAnchors": [
33-
{
34-
"label": "Language Model",
35-
"name": "model",
36-
"type": "BaseLanguageModel",
37-
"id": "llmChain_1-input-model-BaseLanguageModel"
38-
},
39-
{
40-
"label": "Prompt",
41-
"name": "prompt",
42-
"type": "BasePromptTemplate",
43-
"id": "llmChain_1-input-prompt-BasePromptTemplate"
44-
}
45-
],
46-
"inputs": {
47-
"model": "{{huggingFaceInference_LLMs_0.data.instance}}",
48-
"prompt": "{{promptTemplate_0.data.instance}}",
49-
"chainName": ""
50-
},
51-
"outputAnchors": [
52-
{
53-
"name": "output",
54-
"label": "Output",
55-
"type": "options",
56-
"options": [
57-
{
58-
"id": "llmChain_1-output-llmChain-LLMChain|BaseChain|BaseLangChain",
59-
"name": "llmChain",
60-
"label": "LLM Chain",
61-
"type": "LLMChain | BaseChain | BaseLangChain"
62-
},
63-
{
64-
"id": "llmChain_1-output-outputPrediction-string|json",
65-
"name": "outputPrediction",
66-
"label": "Output Prediction",
67-
"type": "string | json"
68-
}
69-
],
70-
"default": "llmChain"
71-
}
72-
],
73-
"outputs": {
74-
"output": "llmChain"
75-
},
76-
"selected": false
77-
},
78-
"positionAbsolute": {
79-
"x": 970.9254258940236,
80-
"y": 320.56761595884564
81-
},
82-
"selected": false,
83-
"dragging": false
84-
},
854
{
865
"width": 300,
876
"height": 475,
@@ -94,8 +13,8 @@
9413
"data": {
9514
"id": "promptTemplate_0",
9615
"label": "Prompt Template",
97-
"name": "promptTemplate",
9816
"version": 1,
17+
"name": "promptTemplate",
9918
"type": "PromptTemplate",
10019
"baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
10120
"category": "Prompts",
@@ -144,7 +63,7 @@
14463
},
14564
{
14665
"width": 300,
147-
"height": 526,
66+
"height": 577,
14867
"id": "huggingFaceInference_LLMs_0",
14968
"position": {
15069
"x": 498.8594464193537,
@@ -154,8 +73,8 @@
15473
"data": {
15574
"id": "huggingFaceInference_LLMs_0",
15675
"label": "HuggingFace Inference",
157-
"name": "huggingFaceInference_LLMs",
15876
"version": 2,
77+
"name": "huggingFaceInference_LLMs",
15978
"type": "HuggingFaceInference",
16079
"baseClasses": ["HuggingFaceInference", "LLM", "BaseLLM", "BaseLanguageModel"],
16180
"category": "LLMs",
@@ -267,27 +186,116 @@
267186
"y": -94.91050256311678
268187
},
269188
"dragging": false
189+
},
190+
{
191+
"width": 300,
192+
"height": 456,
193+
"id": "llmChain_0",
194+
"position": {
195+
"x": 909.6249320819859,
196+
"y": 338.9520801783737
197+
},
198+
"type": "customNode",
199+
"data": {
200+
"id": "llmChain_0",
201+
"label": "LLM Chain",
202+
"version": 3,
203+
"name": "llmChain",
204+
"type": "LLMChain",
205+
"baseClasses": ["LLMChain", "BaseChain", "Runnable"],
206+
"category": "Chains",
207+
"description": "Chain to run queries against LLMs",
208+
"inputParams": [
209+
{
210+
"label": "Chain Name",
211+
"name": "chainName",
212+
"type": "string",
213+
"placeholder": "Name Your Chain",
214+
"optional": true,
215+
"id": "llmChain_0-input-chainName-string"
216+
}
217+
],
218+
"inputAnchors": [
219+
{
220+
"label": "Language Model",
221+
"name": "model",
222+
"type": "BaseLanguageModel",
223+
"id": "llmChain_0-input-model-BaseLanguageModel"
224+
},
225+
{
226+
"label": "Prompt",
227+
"name": "prompt",
228+
"type": "BasePromptTemplate",
229+
"id": "llmChain_0-input-prompt-BasePromptTemplate"
230+
},
231+
{
232+
"label": "Output Parser",
233+
"name": "outputParser",
234+
"type": "BaseLLMOutputParser",
235+
"optional": true,
236+
"id": "llmChain_0-input-outputParser-BaseLLMOutputParser"
237+
}
238+
],
239+
"inputs": {
240+
"model": "{{huggingFaceInference_LLMs_0.data.instance}}",
241+
"prompt": "{{promptTemplate_0.data.instance}}",
242+
"outputParser": "",
243+
"chainName": ""
244+
},
245+
"outputAnchors": [
246+
{
247+
"name": "output",
248+
"label": "Output",
249+
"type": "options",
250+
"options": [
251+
{
252+
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable",
253+
"name": "llmChain",
254+
"label": "LLM Chain",
255+
"type": "LLMChain | BaseChain | Runnable"
256+
},
257+
{
258+
"id": "llmChain_0-output-outputPrediction-string|json",
259+
"name": "outputPrediction",
260+
"label": "Output Prediction",
261+
"type": "string | json"
262+
}
263+
],
264+
"default": "llmChain"
265+
}
266+
],
267+
"outputs": {
268+
"output": "llmChain"
269+
},
270+
"selected": false
271+
},
272+
"selected": false,
273+
"positionAbsolute": {
274+
"x": 909.6249320819859,
275+
"y": 338.9520801783737
276+
},
277+
"dragging": false
270278
}
271279
],
272280
"edges": [
273281
{
274-
"source": "promptTemplate_0",
275-
"sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
276-
"target": "llmChain_1",
277-
"targetHandle": "llmChain_1-input-prompt-BasePromptTemplate",
282+
"source": "huggingFaceInference_LLMs_0",
283+
"sourceHandle": "huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel",
284+
"target": "llmChain_0",
285+
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
278286
"type": "buttonedge",
279-
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_1-llmChain_1-input-prompt-BasePromptTemplate",
287+
"id": "huggingFaceInference_LLMs_0-huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
280288
"data": {
281289
"label": ""
282290
}
283291
},
284292
{
285-
"source": "huggingFaceInference_LLMs_0",
286-
"sourceHandle": "huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel",
287-
"target": "llmChain_1",
288-
"targetHandle": "llmChain_1-input-model-BaseLanguageModel",
293+
"source": "promptTemplate_0",
294+
"sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
295+
"target": "llmChain_0",
296+
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
289297
"type": "buttonedge",
290-
"id": "huggingFaceInference_LLMs_0-huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel-llmChain_1-llmChain_1-input-model-BaseLanguageModel",
298+
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
291299
"data": {
292300
"label": ""
293301
}

0 commit comments

Comments
 (0)