- update LangchainJS version

- add types & interfaces

- small ui bug fix

- update marketplace files
This commit is contained in:
Henry
2023-04-13 18:32:00 +01:00
parent 02d8284f58
commit 9281b57ef1
47 changed files with 1178 additions and 1141 deletions
+147 -137
View File
@@ -3,11 +3,58 @@
"nodes": [
{
"width": 300,
"height": 885,
"height": 360,
"id": "promptTemplate_0",
"position": {
"x": 294.38456937448433,
"y": 66.5400435451831
},
"type": "customNode",
"data": {
"id": "promptTemplate_0",
"label": "Prompt Template",
"name": "promptTemplate",
"type": "PromptTemplate",
"baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Schema to represent a basic prompt for an LLM",
"inputParams": [
{
"label": "Template",
"name": "template",
"type": "string",
"rows": 5,
"placeholder": "What is a good name for a company that makes {product}?"
}
],
"inputAnchors": [],
"inputs": {
"template": "Word: {word}\\nAntonym: {antonym}\\n"
},
"outputAnchors": [
{
"id": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 294.38456937448433,
"y": 66.5400435451831
},
"dragging": false
},
{
"width": 300,
"height": 886,
"id": "fewShotPromptTemplate_0",
"position": {
"x": 495.78246013667433,
"y": 168.3684510250569
"x": 719.2200337843097,
"y": 67.20405755860693
},
"type": "customNode",
"data": {
@@ -15,7 +62,7 @@
"label": "Few Shot Prompt Template",
"name": "fewShotPromptTemplate",
"type": "FewShotPromptTemplate",
"baseClasses": ["BaseStringPromptTemplate", "BasePromptTemplate"],
"baseClasses": ["FewShotPromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Prompt template you can build with examples",
"inputParams": [
@@ -24,7 +71,7 @@
"name": "examples",
"type": "string",
"rows": 5,
"placeholder": "[\n { word: \"happy\", antonym: \"sad\" },\n { word: \"tall\", antonym: \"short\" },\n]"
"placeholder": "[\n { \"word\": \"happy\", \"antonym\": \"sad\" },\n { \"word\": \"tall\", \"antonym\": \"short\" },\n]"
},
{
"label": "Prefix",
@@ -67,12 +114,12 @@
{
"label": "Example Prompt",
"name": "examplePrompt",
"type": "BasePromptTemplate",
"id": "fewShotPromptTemplate_0-input-examplePrompt-BasePromptTemplate"
"type": "PromptTemplate",
"id": "fewShotPromptTemplate_0-input-examplePrompt-PromptTemplate"
}
],
"inputs": {
"examples": "[\n { \"word\": \"happy\", \"antonym\": \"sad\" },\n { \"word\": \"tall\", \"antonym\": \"short\" }\n]",
"examples": "[\n { \"word\": \"happy\", \"antonym\": \"sad\" },\n { \"word\": \"tall\", \"antonym\": \"short\" }\n]",
"examplePrompt": "{{promptTemplate_0.data.instance}}",
"prefix": "Give the antonym of every input",
"suffix": "Word: {input}\\nAntonym:",
@@ -81,128 +128,28 @@
},
"outputAnchors": [
{
"id": "fewShotPromptTemplate_0-output-fewShotPromptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"id": "fewShotPromptTemplate_0-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "fewShotPromptTemplate",
"label": "FewShotPromptTemplate",
"type": "BaseStringPromptTemplate | BasePromptTemplate"
"type": "FewShotPromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 495.78246013667433,
"y": 168.3684510250569
"x": 719.2200337843097,
"y": 67.20405755860693
},
"dragging": false
},
{
"width": 300,
"height": 359,
"id": "promptTemplate_0",
"position": {
"x": 13.229214123006699,
"y": 171.79555808656028
},
"type": "customNode",
"data": {
"id": "promptTemplate_0",
"label": "Prompt Template",
"name": "promptTemplate",
"type": "PromptTemplate",
"baseClasses": ["BaseStringPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Schema to represent a basic prompt for an LLM",
"inputParams": [
{
"label": "Template",
"name": "template",
"type": "string",
"rows": 5,
"placeholder": "What is a good name for a company that makes {product}?"
}
],
"inputAnchors": [],
"inputs": {
"template": "Word: {word}\\nAntonym: {antonym}\\n"
},
"outputAnchors": [
{
"id": "promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "BaseStringPromptTemplate | BasePromptTemplate"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 13.229214123006699,
"y": 171.79555808656028
},
"dragging": false
},
{
"width": 300,
"height": 279,
"id": "llmChain_0",
"position": {
"x": 1237.4411644942688,
"y": 508.82448993622904
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [],
"inputAnchors": [
{
"label": "LLM",
"name": "llm",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-llm-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"llm": "{{openAI_0.data.instance}}",
"prompt": "{{fewShotPromptTemplate_0.data.instance}}"
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1237.4411644942688,
"y": 508.82448993622904
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 472,
"id": "openAI_0",
"position": {
"x": 859.220671981777,
"y": 166.25170842824588
"x": 1089.6434062122398,
"y": 27.515288538129425
},
"type": "customNode",
"data": {
@@ -210,7 +157,7 @@
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["BaseLLM", "BaseLanguageModel"],
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
@@ -259,18 +206,81 @@
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"name": "openAI",
"label": "OpenAI",
"type": "BaseLLM | BaseLanguageModel"
"type": "OpenAI | BaseLLM | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 859.220671981777,
"y": 166.25170842824588
"x": 1089.6434062122398,
"y": 27.515288538129425
},
"dragging": false
},
{
"width": 300,
"height": 461,
"id": "llmChain_0",
"position": {
"x": 1499.2654451385026,
"y": 356.3275374721362
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 5,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_0.data.instance}}",
"prompt": "{{fewShotPromptTemplate_0.data.instance}}",
"promptValues": ""
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "LLMChain | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1499.2654451385026,
"y": 356.3275374721362
},
"dragging": false
}
@@ -278,33 +288,33 @@
"edges": [
{
"source": "promptTemplate_0",
"sourceHandle": "promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "fewShotPromptTemplate_0",
"targetHandle": "fewShotPromptTemplate_0-input-examplePrompt-BasePromptTemplate",
"targetHandle": "fewShotPromptTemplate_0-input-examplePrompt-PromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate-fewShotPromptTemplate_0-fewShotPromptTemplate_0-input-examplePrompt-BasePromptTemplate",
"data": {
"label": ""
}
},
{
"source": "fewShotPromptTemplate_0",
"sourceHandle": "fewShotPromptTemplate_0-output-fewShotPromptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "fewShotPromptTemplate_0-fewShotPromptTemplate_0-output-fewShotPromptTemplate-BaseStringPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-fewShotPromptTemplate_0-fewShotPromptTemplate_0-input-examplePrompt-PromptTemplate",
"data": {
"label": ""
}
},
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-llm-BaseLanguageModel",
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-BaseLLM|BaseLanguageModel-llmChain_0-llmChain_0-input-llm-BaseLanguageModel",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "fewShotPromptTemplate_0",
"sourceHandle": "fewShotPromptTemplate_0-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "fewShotPromptTemplate_0-fewShotPromptTemplate_0-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
@@ -3,11 +3,11 @@
"nodes": [
{
"width": 300,
"height": 277,
"height": 278,
"id": "serpAPI_0",
"position": {
"x": 738.3791942291381,
"y": 61.26790912730354
"x": 509.0449726750261,
"y": 40.29354052812607
},
"type": "customNode",
"data": {
@@ -15,7 +15,7 @@
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["Tool"],
"baseClasses": ["SerpAPI", "Tool"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
@@ -29,28 +29,28 @@
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_0-output-serpAPI-Tool",
"id": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"name": "serpAPI",
"label": "SerpAPI",
"type": "Tool"
"type": "SerpAPI | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 738.3791942291381,
"y": 61.26790912730354
"x": 509.0449726750261,
"y": 40.29354052812607
},
"dragging": false
},
{
"width": 300,
"height": 142,
"height": 143,
"id": "calculator_0",
"position": {
"x": 1088.946090950564,
"y": 63.99579982092973
"x": 877.5497970197198,
"y": 59.162476101133734
},
"type": "customNode",
"data": {
@@ -58,7 +58,7 @@
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Tool"],
"baseClasses": ["Calculator", "Tool"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
@@ -66,28 +66,28 @@
"inputs": {},
"outputAnchors": [
{
"id": "calculator_0-output-calculator-Tool",
"id": "calculator_0-output-calculator-Calculator|Tool",
"name": "calculator",
"label": "Calculator",
"type": "Tool"
"type": "Calculator | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1088.946090950564,
"y": 63.99579982092973
"x": 877.5497970197198,
"y": 59.162476101133734
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 472,
"id": "chatOpenAI_0",
"position": {
"x": 741.0274881835038,
"y": 365.0891876953251
"x": 451.9774324962526,
"y": 370.86893557300755
},
"type": "customNode",
"data": {
@@ -95,7 +95,7 @@
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["BaseChatModel", "BaseLanguageModel"],
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
@@ -109,6 +109,18 @@
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0314",
"name": "gpt-4-0314"
},
{
"label": "gpt-4-32k-0314",
"name": "gpt-4-32k-0314"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
@@ -136,18 +148,18 @@
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel",
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "BaseChatModel | BaseLanguageModel"
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 741.0274881835038,
"y": 365.0891876953251
"x": 451.9774324962526,
"y": 370.86893557300755
},
"dragging": false
},
@@ -156,8 +168,8 @@
"height": 376,
"id": "bufferMemory_0",
"position": {
"x": 753.3628847860326,
"y": 864.8446075184364
"x": 823.1867811443266,
"y": 704.7589374803455
},
"type": "customNode",
"data": {
@@ -165,7 +177,7 @@
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BaseChatMemory", "BaseMemory"],
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Perform calculations on response",
"inputParams": [
@@ -189,28 +201,28 @@
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BaseChatMemory|BaseMemory",
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BaseChatMemory | BaseMemory"
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 753.3628847860326,
"y": 864.8446075184364
"x": 823.1867811443266,
"y": 704.7589374803455
},
"dragging": false
},
{
"width": 300,
"height": 330,
"height": 331,
"id": "conversationalAgent_0",
"position": {
"x": 1487.0651648211865,
"y": 497.1658250180486
"x": 1257.706443811743,
"y": 335.10277854416955
},
"type": "customNode",
"data": {
@@ -218,7 +230,7 @@
"label": "Conversational Agent",
"name": "conversationalAgent",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor"],
"baseClasses": ["AgentExecutor", "BaseChain"],
"category": "Agents",
"description": "Conversational agent for a chat model. It will utilize chat specific prompts",
"inputParams": [],
@@ -250,18 +262,18 @@
},
"outputAnchors": [
{
"id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor",
"id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor|BaseChain",
"name": "conversationalAgent",
"label": "AgentExecutor",
"type": "AgentExecutor"
"type": "AgentExecutor | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1487.0651648211865,
"y": 497.1658250180486
"x": 1257.706443811743,
"y": 335.10277854416955
},
"dragging": false
}
@@ -269,44 +281,44 @@
"edges": [
{
"source": "calculator_0",
"sourceHandle": "calculator_0-output-calculator-Tool",
"sourceHandle": "calculator_0-output-calculator-Calculator|Tool",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_0-calculator_0-output-calculator-Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"id": "calculator_0-calculator_0-output-calculator-Calculator|Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_0",
"sourceHandle": "serpAPI_0-output-serpAPI-Tool",
"sourceHandle": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-SerpAPI|Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel-conversationalAgent_0-conversationalAgent_0-input-model-BaseChatModel",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-conversationalAgent_0-conversationalAgent_0-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_0",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BaseChatMemory|BaseMemory",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-memory-BaseChatMemory",
"type": "buttonedge",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory",
"data": {
"label": ""
}
@@ -6,8 +6,8 @@
"height": 376,
"id": "recursiveCharacterTextSplitter_0",
"position": {
"x": 542.7867965644035,
"y": 239.47308806541884
"x": 483.2031495359837,
"y": 208.70988551611597
},
"type": "customNode",
"data": {
@@ -15,7 +15,7 @@
"label": "Recursive Character Text Splitter",
"name": "recursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter",
"baseClasses": ["TextSplitter"],
"baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter"],
"category": "Text Splitters",
"description": "Split documents recursively by different characters - starting with \"\n\n\", then \"\n\", then \" \"",
"inputParams": [
@@ -40,35 +40,35 @@
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter",
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "TextSplitter"
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 542.7867965644035,
"y": 239.47308806541884
"x": 483.2031495359837,
"y": 208.70988551611597
},
"dragging": false
},
{
"width": 300,
"height": 358,
"height": 359,
"id": "textFile_0",
"position": {
"x": 928.3774169979697,
"y": 473.8284271247462
"x": 858.2160149124683,
"y": 215.870325304158
},
"type": "customNode",
"data": {
"id": "textFile_0",
"label": "Text File",
"name": "textFile",
"type": "Text",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from text files",
@@ -96,7 +96,7 @@
{
"id": "textFile_0-output-textFile-Document",
"name": "textFile",
"label": "Text",
"label": "Document",
"type": "Document"
}
],
@@ -104,61 +104,18 @@
},
"selected": false,
"positionAbsolute": {
"x": 928.3774169979697,
"y": 473.8284271247462
"x": 858.2160149124683,
"y": 215.870325304158
},
"dragging": false
},
{
"width": 300,
"height": 277,
"id": "openAIEmbeddings_0",
"position": {
"x": 924.7825209307788,
"y": 870.671152679558
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_0",
"label": "OpenAI Embeddings",
"name": "openAIEmbeddings",
"type": "OpenAIEmbeddings",
"baseClasses": ["Embeddings"],
"category": "Embeddings",
"description": "OpenAI API to generate embeddings for a given text",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "Embeddings"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 924.7825209307788,
"y": 870.671152679558
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 472,
"id": "openAI_0",
"position": {
"x": 1296.7206878349027,
"y": 167.80701218012993
"x": 1207.112878089014,
"y": 19.892224585997383
},
"type": "customNode",
"data": {
@@ -166,7 +123,7 @@
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["BaseLLM", "BaseLanguageModel"],
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
@@ -215,28 +172,71 @@
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"name": "openAI",
"label": "OpenAI",
"type": "BaseLLM | BaseLanguageModel"
"type": "OpenAI | BaseLLM | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1296.7206878349027,
"y": 167.80701218012993
"x": 1207.112878089014,
"y": 19.892224585997383
},
"dragging": false
},
{
"width": 300,
"height": 576,
"height": 278,
"id": "openAIEmbeddings_0",
"position": {
"x": 758.2670802362803,
"y": 635.7886850619154
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_0",
"label": "OpenAI Embeddings",
"name": "openAIEmbeddings",
"type": "OpenAIEmbeddings",
"baseClasses": ["OpenAIEmbeddings", "Embeddings"],
"category": "Embeddings",
"description": "OpenAI API to generate embeddings for a given text",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 758.2670802362803,
"y": 635.7886850619154
},
"dragging": false
},
{
"width": 300,
"height": 577,
"id": "pineconeUpsert_0",
"position": {
"x": 1293.8922607101565,
"y": 692.4802438205481
"x": 1212.220130988712,
"y": 526.8130243230098
},
"type": "customNode",
"data": {
@@ -296,18 +296,18 @@
},
"selected": false,
"positionAbsolute": {
"x": 1293.8922607101565,
"y": 692.4802438205481
"x": 1212.220130988712,
"y": 526.8130243230098
},
"dragging": false
},
{
"width": 300,
"height": 279,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1742.1979599824272,
"y": 607.6274300781624
"x": 1608.0332939239609,
"y": 410.3973881655837
},
"type": "customNode",
"data": {
@@ -315,7 +315,7 @@
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["BaseChain"],
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [],
@@ -323,8 +323,8 @@
{
"label": "LLM",
"name": "llm",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel"
"type": "BaseLLM",
"id": "conversationalRetrievalQAChain_0-input-llm-BaseLLM"
},
{
"label": "Vector Store Retriever",
@@ -339,18 +339,18 @@
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-BaseChain",
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "BaseChain"
"type": "ConversationalRetrievalQAChain | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1742.1979599824272,
"y": 607.6274300781624
"x": 1608.0332939239609,
"y": 410.3973881655837
},
"dragging": false
}
@@ -358,33 +358,11 @@
"edges": [
{
"source": "recursiveCharacterTextSplitter_0",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "textFile_0",
"targetHandle": "textFile_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-BaseLLM|BaseLanguageModel-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_0",
"sourceHandle": "pineconeUpsert_0-output-pineconeUpsert-BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_0-pineconeUpsert_0-output-pineconeUpsert-BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
@@ -402,11 +380,33 @@
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-Embeddings",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-Embeddings-pineconeUpsert_0-pineconeUpsert_0-input-embeddings-Embeddings",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_0-pineconeUpsert_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-llm-BaseLLM",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-llm-BaseLLM",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_0",
"sourceHandle": "pineconeUpsert_0-output-pineconeUpsert-BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_0-pineconeUpsert_0-output-pineconeUpsert-BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
+233 -233
View File
@@ -3,64 +3,177 @@
"nodes": [
{
"width": 300,
"height": 279,
"id": "conversationalRetrievalQAChain_0",
"height": 376,
"id": "recursiveCharacterTextSplitter_0",
"position": {
"x": 1557.4588265034258,
"y": 314.1114881397983
"x": 515.0218130437521,
"y": 133.69013788278536
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["BaseChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [],
"inputAnchors": [
"id": "recursiveCharacterTextSplitter_0",
"label": "Recursive Character Text Splitter",
"name": "recursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter",
"baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter"],
"category": "Text Splitters",
"description": "Split documents recursively by different characters - starting with \"\n\n\", then \"\n\", then \" \"",
"inputParams": [
{
"label": "LLM",
"name": "llm",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel"
"label": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true
}
],
"inputAnchors": [],
"inputs": {
"llm": "{{openAI_0.data.instance}}",
"vectorStoreRetriever": "{{pineconeUpsert_0.data.instance}}"
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-BaseChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "BaseChain"
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1557.4588265034258,
"y": 314.1114881397983
"x": 515.0218130437521,
"y": 133.69013788278536
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 526,
"id": "github_0",
"position": {
"x": 900.6064873076141,
"y": 12.699982761973843
},
"type": "customNode",
"data": {
"id": "github_0",
"label": "Github",
"name": "github",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from a GitHub repository",
"inputParams": [
{
"label": "Repo Link",
"name": "repoLink",
"type": "string",
"placeholder": "https://github.com/FlowiseAI/Flowise"
},
{
"label": "Branch",
"name": "branch",
"type": "string",
"default": "main"
},
{
"label": "Access Token",
"name": "accessToken",
"type": "password",
"placeholder": "<GITHUB_ACCESS_TOKEN>",
"optional": true
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "github_0-input-textSplitter-TextSplitter"
}
],
"inputs": {
"repoLink": "https://github.com/kyrolabs/awesome-langchain",
"branch": "main",
"textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}"
},
"outputAnchors": [
{
"id": "github_0-output-github-Document",
"name": "github",
"label": "Document",
"type": "Document"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 900.6064873076141,
"y": 12.699982761973843
},
"dragging": false
},
{
"width": 300,
"height": 278,
"id": "openAIEmbeddings_0",
"position": {
"x": 904.1187025903466,
"y": 591.9520266659382
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_0",
"label": "OpenAI Embeddings",
"name": "openAIEmbeddings",
"type": "OpenAIEmbeddings",
"baseClasses": ["OpenAIEmbeddings", "Embeddings"],
"category": "Embeddings",
"description": "OpenAI API to generate embeddings for a given text",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 904.1187025903466,
"y": 591.9520266659382
},
"dragging": false
},
{
"width": 300,
"height": 472,
"id": "openAI_0",
"position": {
"x": 1079.79101466888,
"y": -178.54116849152098
"x": 1268.0020638568344,
"y": -134.40583642072306
},
"type": "customNode",
"data": {
@@ -68,7 +181,7 @@
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["BaseLLM", "BaseLanguageModel"],
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
@@ -113,198 +226,32 @@
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": "0"
"temperature": 0.7
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"name": "openAI",
"label": "OpenAI",
"type": "BaseLLM | BaseLanguageModel"
"type": "OpenAI | BaseLLM | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1079.79101466888,
"y": -178.54116849152098
"x": 1268.0020638568344,
"y": -134.40583642072306
},
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "recursiveCharacterTextSplitter_0",
"position": {
"x": 235.6130554027991,
"y": -89.82544163833616
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_0",
"label": "Recursive Character Text Splitter",
"name": "recursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter",
"baseClasses": ["TextSplitter"],
"category": "Text Splitters",
"description": "Split documents recursively by different characters - starting with \"\n\n\", then \"\n\", then \" \"",
"inputParams": [
{
"label": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "TextSplitter"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 235.6130554027991,
"y": -89.82544163833616
},
"dragging": false
},
{
"width": 300,
"height": 277,
"id": "openAIEmbeddings_0",
"position": {
"x": 654.473220763302,
"y": 508.09797567725514
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_0",
"label": "OpenAI Embeddings",
"name": "openAIEmbeddings",
"type": "OpenAIEmbeddings",
"baseClasses": ["Embeddings"],
"category": "Embeddings",
"description": "OpenAI API to generate embeddings for a given text",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "Embeddings"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 654.473220763302,
"y": 508.09797567725514
},
"dragging": false
},
{
"width": 300,
"height": 525,
"id": "github_0",
"position": {
"x": 649.303910738229,
"y": -93.90566658624722
},
"type": "customNode",
"data": {
"id": "github_0",
"label": "Github",
"name": "github",
"type": "Github",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from a GitHub repository",
"inputParams": [
{
"label": "Repo Link",
"name": "repoLink",
"type": "string",
"placeholder": "https://github.com/FlowiseAI/Flowise"
},
{
"label": "Branch",
"name": "branch",
"type": "string",
"default": "main"
},
{
"label": "Access Token",
"name": "accessToken",
"type": "password",
"placeholder": "<GITHUB_ACCESS_TOKEN>",
"optional": true
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "github_0-input-textSplitter-TextSplitter"
}
],
"inputs": {
"repoLink": "https://github.com/kyrolabs/awesome-langchain",
"branch": "main",
"textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}"
},
"outputAnchors": [
{
"id": "github_0-output-github-Document",
"name": "github",
"label": "Github",
"type": "Document"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 649.303910738229,
"y": -93.90566658624722
},
"dragging": false
},
{
"width": 300,
"height": 576,
"height": 577,
"id": "pineconeUpsert_0",
"position": {
"x": 1089.3652950320754,
"y": 354.9656606763275
"x": 1265.1304547629002,
"y": 376.13121569675315
},
"type": "customNode",
"data": {
@@ -364,8 +311,61 @@
},
"selected": false,
"positionAbsolute": {
"x": 1089.3652950320754,
"y": 354.9656606763275
"x": 1265.1304547629002,
"y": 376.13121569675315
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1658.7012040564862,
"y": 197.0636463189023
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [],
"inputAnchors": [
{
"label": "LLM",
"name": "llm",
"type": "BaseLLM",
"id": "conversationalRetrievalQAChain_0-input-llm-BaseLLM"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"llm": "{{openAI_0.data.instance}}",
"vectorStoreRetriever": "{{pineconeUpsert_0.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1658.7012040564862,
"y": 197.0636463189023
},
"dragging": false
}
@@ -373,22 +373,33 @@
"edges": [
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel",
"targetHandle": "conversationalRetrievalQAChain_0-input-llm-BaseLLM",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-BaseLLM|BaseLanguageModel-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-llm-BaseLanguageModel",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-llm-BaseLLM",
"data": {
"label": ""
}
},
{
"source": "recursiveCharacterTextSplitter_0",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter",
"target": "github_0",
"targetHandle": "github_0-input-textSplitter-TextSplitter",
"source": "pineconeUpsert_0",
"sourceHandle": "pineconeUpsert_0-output-pineconeUpsert-BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-TextSplitter-github_0-github_0-input-textSplitter-TextSplitter",
"id": "pineconeUpsert_0-pineconeUpsert_0-output-pineconeUpsert-BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_0-pineconeUpsert_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
@@ -405,23 +416,12 @@
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-Embeddings",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-embeddings-Embeddings",
"source": "recursiveCharacterTextSplitter_0",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "github_0",
"targetHandle": "github_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-Embeddings-pineconeUpsert_0-pineconeUpsert_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_0",
"sourceHandle": "pineconeUpsert_0-output-pineconeUpsert-BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_0-pineconeUpsert_0-output-pineconeUpsert-BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-github_0-github_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
@@ -3,102 +3,11 @@
"nodes": [
{
"width": 300,
"height": 279,
"id": "mrlkAgentLLM_0",
"position": {
"x": 1520.156054894558,
"y": 466.34196346475386
},
"type": "customNode",
"data": {
"id": "mrlkAgentLLM_0",
"label": "MRLK Agent for LLMs",
"name": "mrlkAgentLLM",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor"],
"category": "Agents",
"description": "Agent that uses the ReAct Framework to decide what action to take, optimized to be used with LLMs",
"inputParams": [],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "mrlkAgentLLM_0-input-tools-Tool"
},
{
"label": "LLM Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "mrlkAgentLLM_0-input-model-BaseLanguageModel"
}
],
"inputs": {
"tools": ["{{calculator_0.data.instance}}", "{{serpAPI_0.data.instance}}"],
"model": "{{openAI_0.data.instance}}"
},
"outputAnchors": [
{
"id": "mrlkAgentLLM_0-output-mrlkAgentLLM-AgentExecutor",
"name": "mrlkAgentLLM",
"label": "AgentExecutor",
"type": "AgentExecutor"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1520.156054894558,
"y": 466.34196346475386
},
"dragging": false
},
{
"width": 300,
"height": 142,
"id": "calculator_0",
"position": {
"x": 1141.0497522733922,
"y": 172.32224599434292
},
"type": "customNode",
"data": {
"id": "calculator_0",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Tool"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_0-output-calculator-Tool",
"name": "calculator",
"label": "Calculator",
"type": "Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1141.0497522733922,
"y": 172.32224599434292
},
"dragging": false
},
{
"width": 300,
"height": 277,
"height": 278,
"id": "serpAPI_0",
"position": {
"x": 797.0350733284566,
"y": 199.36655049779267
"x": 571.585786437627,
"y": 127.14213562373095
},
"type": "customNode",
"data": {
@@ -106,7 +15,7 @@
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["Tool"],
"baseClasses": ["SerpAPI", "Tool"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
@@ -120,28 +29,119 @@
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_0-output-serpAPI-Tool",
"id": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"name": "serpAPI",
"label": "SerpAPI",
"type": "Tool"
"type": "SerpAPI | Tool"
}
],
"selected": false
},
"positionAbsolute": {
"x": 571.585786437627,
"y": 127.14213562373095
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 143,
"id": "calculator_0",
"position": {
"x": 904.7519886598635,
"y": 135.4705627484772
},
"type": "customNode",
"data": {
"id": "calculator_0",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Calculator", "Tool"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_0-output-calculator-Calculator|Tool",
"name": "calculator",
"label": "Calculator",
"type": "Calculator | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 797.0350733284566,
"y": 199.36655049779267
"x": 904.7519886598635,
"y": 135.4705627484772
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 280,
"id": "mrklAgentLLM_0",
"position": {
"x": 1251.3621617151298,
"y": 323.8137084989848
},
"type": "customNode",
"data": {
"id": "mrklAgentLLM_0",
"label": "MRKL Agent for LLMs",
"name": "mrklAgentLLM",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain"],
"category": "Agents",
"description": "Agent that uses the ReAct Framework to decide what action to take, optimized to be used with LLMs",
"inputParams": [],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "mrklAgentLLM_0-input-tools-Tool"
},
{
"label": "LLM Model",
"name": "model",
"type": "BaseLLM",
"id": "mrklAgentLLM_0-input-model-BaseLLM"
}
],
"inputs": {
"tools": ["{{calculator_0.data.instance}}", "{{serpAPI_0.data.instance}}"],
"model": "{{openAI_0.data.instance}}"
},
"outputAnchors": [
{
"id": "mrklAgentLLM_0-output-mrklAgentLLM-AgentExecutor|BaseChain",
"name": "mrklAgentLLM",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1251.3621617151298,
"y": 323.8137084989848
},
"dragging": false
},
{
"width": 300,
"height": 472,
"id": "openAI_0",
"position": {
"x": 917.6484006031452,
"y": 522.1507882519595
"x": 708.9235615351174,
"y": 438.84314575050763
},
"type": "customNode",
"data": {
@@ -149,7 +149,7 @@
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["BaseLLM", "BaseLanguageModel"],
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
@@ -198,52 +198,52 @@
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"name": "openAI",
"label": "OpenAI",
"type": "BaseLLM | BaseLanguageModel"
"type": "OpenAI | BaseLLM | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 917.6484006031452,
"y": 522.1507882519595
"x": 708.9235615351174,
"y": 438.84314575050763
},
"selected": false,
"dragging": false
}
],
"edges": [
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"target": "mrlkAgentLLM_0",
"targetHandle": "mrlkAgentLLM_0-input-model-BaseLanguageModel",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-model-BaseLLM",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-BaseLLM|BaseLanguageModel-mrlkAgentLLM_0-mrlkAgentLLM_0-input-model-BaseLanguageModel",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel-mrklAgentLLM_0-mrklAgentLLM_0-input-model-BaseLLM",
"data": {
"label": ""
}
},
{
"source": "calculator_0",
"sourceHandle": "calculator_0-output-calculator-Tool",
"target": "mrlkAgentLLM_0",
"targetHandle": "mrlkAgentLLM_0-input-tools-Tool",
"sourceHandle": "calculator_0-output-calculator-Calculator|Tool",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_0-calculator_0-output-calculator-Tool-mrlkAgentLLM_0-mrlkAgentLLM_0-input-tools-Tool",
"id": "calculator_0-calculator_0-output-calculator-Calculator|Tool-mrklAgentLLM_0-mrklAgentLLM_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_0",
"sourceHandle": "serpAPI_0-output-serpAPI-Tool",
"target": "mrlkAgentLLM_0",
"targetHandle": "mrlkAgentLLM_0-input-tools-Tool",
"sourceHandle": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-Tool-mrlkAgentLLM_0-mrlkAgentLLM_0-input-tools-Tool",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-SerpAPI|Tool-mrklAgentLLM_0-mrklAgentLLM_0-input-tools-Tool",
"data": {
"label": ""
}
@@ -3,74 +3,11 @@
"nodes": [
{
"width": 300,
"height": 460,
"id": "llmChain_0",
"position": {
"x": 1515.563392772433,
"y": 334.61150897841924
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 5,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true
}
],
"inputAnchors": [
{
"label": "LLM",
"name": "llm",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-llm-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"llm": "{{openAI_0.data.instance}}",
"prompt": "{{promptTemplate_0.data.instance}}",
"promptValues": ""
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1515.563392772433,
"y": 334.61150897841924
},
"dragging": false
},
{
"width": 300,
"height": 471,
"height": 472,
"id": "openAI_0",
"position": {
"x": 954.7026430819806,
"y": 6.975032607064918
"x": 968.1753795547951,
"y": -8.62176310944858
},
"type": "customNode",
"data": {
@@ -78,7 +15,7 @@
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["BaseLLM", "BaseLanguageModel"],
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
@@ -127,28 +64,28 @@
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"name": "openAI",
"label": "OpenAI",
"type": "BaseLLM | BaseLanguageModel"
"type": "OpenAI | BaseLLM | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 954.7026430819806,
"y": 6.975032607064918
"x": 968.1753795547951,
"y": -8.62176310944858
},
"dragging": false
},
{
"width": 300,
"height": 359,
"height": 360,
"id": "promptTemplate_0",
"position": {
"x": 954.1542757936061,
"y": 515.2247261712328
"x": 970.576876549135,
"y": 502.493937944275
},
"type": "customNode",
"data": {
@@ -156,7 +93,7 @@
"label": "Prompt Template",
"name": "promptTemplate",
"type": "PromptTemplate",
"baseClasses": ["BaseStringPromptTemplate", "BasePromptTemplate"],
"baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Schema to represent a basic prompt for an LLM",
"inputParams": [
@@ -174,41 +111,104 @@
},
"outputAnchors": [
{
"id": "promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"id": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "BaseStringPromptTemplate | BasePromptTemplate"
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 954.1542757936061,
"y": 515.2247261712328
"x": 970.576876549135,
"y": 502.493937944275
},
"dragging": false
},
{
"width": 300,
"height": 461,
"id": "llmChain_0",
"position": {
"x": 1414.1175742139496,
"y": 340.4040954840462
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 5,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_0.data.instance}}",
"prompt": "{{promptTemplate_0.data.instance}}",
"promptValues": ""
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "LLMChain | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1414.1175742139496,
"y": 340.4040954840462
},
"dragging": false
}
],
"edges": [
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-BaseLLM|BaseLanguageModel",
"source": "promptTemplate_0",
"sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-llm-BaseLanguageModel",
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-BaseLLM|BaseLanguageModel-llmChain_0-llmChain_0-input-llm-BaseLanguageModel",
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
},
{
"source": "promptTemplate_0",
"sourceHandle": "promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate",
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-BaseStringPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
+157 -145
View File
@@ -4,143 +4,10 @@
{
"width": 300,
"height": 460,
"id": "llmChain_0",
"position": {
"x": 1301.8762472836022,
"y": 772.7199253009146
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 5,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true
}
],
"inputAnchors": [
{
"label": "LLM",
"name": "llm",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-llm-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"llm": "{{chatOpenAI_0.data.instance}}",
"prompt": "{{chatPromptTemplate_0.data.instance}}",
"promptValues": "{\n \"input_language\": \"English\",\n \"output_language\": \"Italian\"\n}"
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1301.8762472836022,
"y": 772.7199253009146
},
"dragging": false
},
{
"width": 300,
"height": 471,
"id": "chatOpenAI_0",
"position": {
"x": 821.5000372338304,
"y": 369.8333649665954
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["BaseChatModel", "BaseLanguageModel"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0301",
"name": "gpt-3.5-turbo-0301"
}
],
"default": "gpt-3.5-turbo",
"optional": true
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0"
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "BaseChatModel | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 821.5000372338304,
"y": 369.8333649665954
},
"dragging": false
},
{
"width": 300,
"height": 459,
"id": "chatPromptTemplate_0",
"position": {
"x": 821.3479428749118,
"y": 871.7203878238932
"x": 524,
"y": 237
},
"type": "customNode",
"data": {
@@ -148,7 +15,7 @@
"label": "Chat Prompt Template",
"name": "chatPromptTemplate",
"type": "ChatPromptTemplate",
"baseClasses": ["BasePromptTemplate"],
"baseClasses": ["ChatPromptTemplate", "BaseChatPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Schema to represent a chat prompt",
"inputParams": [
@@ -174,18 +41,163 @@
},
"outputAnchors": [
{
"id": "chatPromptTemplate_0-output-chatPromptTemplate-BasePromptTemplate",
"id": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
"name": "chatPromptTemplate",
"label": "ChatPromptTemplate",
"type": "BasePromptTemplate"
"type": "ChatPromptTemplate | BaseChatPromptTemplate | BasePromptTemplate"
}
],
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 524,
"y": 237
}
},
{
"width": 300,
"height": 472,
"id": "chatOpenAI_0",
"position": {
"x": 855.1997276913991,
"y": 24.090553068402556
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0314",
"name": "gpt-4-0314"
},
{
"label": "gpt-4-32k-0314",
"name": "gpt-4-32k-0314"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0301",
"name": "gpt-3.5-turbo-0301"
}
],
"default": "gpt-3.5-turbo",
"optional": true
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 821.3479428749118,
"y": 871.7203878238932
"x": 855.1997276913991,
"y": 24.090553068402556
},
"dragging": false
},
{
"width": 300,
"height": 461,
"id": "llmChain_0",
"position": {
"x": 1192.2235692202612,
"y": 361.71736677076257
},
"type": "customNode",
"data": {
"id": "llmChain_0",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 5,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_0-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_0-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"prompt": "{{chatPromptTemplate_0.data.instance}}",
"promptValues": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}"
},
"outputAnchors": [
{
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain",
"name": "llmChain",
"label": "LLMChain",
"type": "LLMChain | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1192.2235692202612,
"y": 361.71736677076257
},
"dragging": false
}
@@ -193,22 +205,22 @@
"edges": [
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-llm-BaseLanguageModel",
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-BaseChatModel|BaseLanguageModel-llmChain_0-llmChain_0-input-llm-BaseLanguageModel",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "chatPromptTemplate_0",
"sourceHandle": "chatPromptTemplate_0-output-chatPromptTemplate-BasePromptTemplate",
"sourceHandle": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
"target": "llmChain_0",
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "chatPromptTemplate_0-chatPromptTemplate_0-output-chatPromptTemplate-BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"id": "chatPromptTemplate_0-chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}