|
1 | 1 | {
|
2 | 2 | "description": "Simple LLM Chain using HuggingFace Inference API on falcon-7b-instruct model",
|
3 | 3 | "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 |
| - }, |
85 | 4 | {
|
86 | 5 | "width": 300,
|
87 | 6 | "height": 475,
|
|
94 | 13 | "data": {
|
95 | 14 | "id": "promptTemplate_0",
|
96 | 15 | "label": "Prompt Template",
|
97 |
| - "name": "promptTemplate", |
98 | 16 | "version": 1,
|
| 17 | + "name": "promptTemplate", |
99 | 18 | "type": "PromptTemplate",
|
100 | 19 | "baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
|
101 | 20 | "category": "Prompts",
|
|
144 | 63 | },
|
145 | 64 | {
|
146 | 65 | "width": 300,
|
147 |
| - "height": 526, |
| 66 | + "height": 577, |
148 | 67 | "id": "huggingFaceInference_LLMs_0",
|
149 | 68 | "position": {
|
150 | 69 | "x": 498.8594464193537,
|
|
154 | 73 | "data": {
|
155 | 74 | "id": "huggingFaceInference_LLMs_0",
|
156 | 75 | "label": "HuggingFace Inference",
|
157 |
| - "name": "huggingFaceInference_LLMs", |
158 | 76 | "version": 2,
|
| 77 | + "name": "huggingFaceInference_LLMs", |
159 | 78 | "type": "HuggingFaceInference",
|
160 | 79 | "baseClasses": ["HuggingFaceInference", "LLM", "BaseLLM", "BaseLanguageModel"],
|
161 | 80 | "category": "LLMs",
|
|
267 | 186 | "y": -94.91050256311678
|
268 | 187 | },
|
269 | 188 | "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 |
270 | 278 | }
|
271 | 279 | ],
|
272 | 280 | "edges": [
|
273 | 281 | {
|
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", |
278 | 286 | "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", |
280 | 288 | "data": {
|
281 | 289 | "label": ""
|
282 | 290 | }
|
283 | 291 | },
|
284 | 292 | {
|
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", |
289 | 297 | "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", |
291 | 299 | "data": {
|
292 | 300 | "label": ""
|
293 | 301 | }
|
|
0 commit comments