add tools marketplace

This commit is contained in:
Henry
2023-07-01 23:59:51 +01:00
parent 4cadd7aa37
commit c8ba8e2aee
42 changed files with 444 additions and 69 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,435 @@
{
"description": "Output antonym of given user input using few-shot prompt template built with examples",
"nodes": [
{
"width": 300,
"height": 534,
"id": "promptTemplate_1",
"position": {
"x": 532.2791692529131,
"y": -31.128527027841372
},
"type": "customNode",
"data": {
"id": "promptTemplate_1",
"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": 4,
"placeholder": "What is a good name for a company that makes {product}?",
"id": "promptTemplate_1-input-template-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "promptTemplate_1-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"template": "Word: {word}\\nAntonym: {antonym}\\n",
"promptValues": ""
},
"outputAnchors": [
{
"id": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 532.2791692529131,
"y": -31.128527027841372
},
"dragging": false
},
{
"width": 300,
"height": 956,
"id": "fewShotPromptTemplate_1",
"position": {
"x": 886.3229032369354,
"y": -32.18537399495787
},
"type": "customNode",
"data": {
"id": "fewShotPromptTemplate_1",
"label": "Few Shot Prompt Template",
"name": "fewShotPromptTemplate",
"type": "FewShotPromptTemplate",
"baseClasses": ["FewShotPromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Prompt template you can build with examples",
"inputParams": [
{
"label": "Examples",
"name": "examples",
"type": "string",
"rows": 4,
"placeholder": "[\n { \"word\": \"happy\", \"antonym\": \"sad\" },\n { \"word\": \"tall\", \"antonym\": \"short\" },\n]",
"id": "fewShotPromptTemplate_1-input-examples-string"
},
{
"label": "Prefix",
"name": "prefix",
"type": "string",
"rows": 4,
"placeholder": "Give the antonym of every input",
"id": "fewShotPromptTemplate_1-input-prefix-string"
},
{
"label": "Suffix",
"name": "suffix",
"type": "string",
"rows": 4,
"placeholder": "Word: {input}\nAntonym:",
"id": "fewShotPromptTemplate_1-input-suffix-string"
},
{
"label": "Example Seperator",
"name": "exampleSeparator",
"type": "string",
"placeholder": "\n\n",
"id": "fewShotPromptTemplate_1-input-exampleSeparator-string"
},
{
"label": "Template Format",
"name": "templateFormat",
"type": "options",
"options": [
{
"label": "f-string",
"name": "f-string"
},
{
"label": "jinja-2",
"name": "jinja-2"
}
],
"default": "f-string",
"id": "fewShotPromptTemplate_1-input-templateFormat-options"
}
],
"inputAnchors": [
{
"label": "Example Prompt",
"name": "examplePrompt",
"type": "PromptTemplate",
"id": "fewShotPromptTemplate_1-input-examplePrompt-PromptTemplate"
}
],
"inputs": {
"examples": "[\n { \"word\": \"happy\", \"antonym\": \"sad\" },\n { \"word\": \"tall\", \"antonym\": \"short\" }\n]",
"examplePrompt": "{{promptTemplate_1.data.instance}}",
"prefix": "Give the antonym of every input",
"suffix": "Word: {input}\\nAntonym:",
"exampleSeparator": "\\n\\n",
"templateFormat": "f-string"
},
"outputAnchors": [
{
"id": "fewShotPromptTemplate_1-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "fewShotPromptTemplate",
"label": "FewShotPromptTemplate",
"type": "FewShotPromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 886.3229032369354,
"y": -32.18537399495787
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "openAI_1",
"position": {
"x": 1224.5139327142097,
"y": -30.864315286062364
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1224.5139327142097,
"y": -30.864315286062364
},
"dragging": false
},
{
"width": 300,
"height": 407,
"id": "llmChain_1",
"position": {
"x": 1635.363191180743,
"y": 450.00105475193766
},
"type": "customNode",
"data": {
"id": "llmChain_1",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_1-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_1-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_1-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_1.data.instance}}",
"prompt": "{{fewShotPromptTemplate_1.data.instance}}",
"chainName": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_1-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_1-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "llmChain"
},
"selected": false
},
"positionAbsolute": {
"x": 1635.363191180743,
"y": 450.00105475193766
},
"selected": false,
"dragging": false
}
],
"edges": [
{
"source": "promptTemplate_1",
"sourceHandle": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "fewShotPromptTemplate_1",
"targetHandle": "fewShotPromptTemplate_1-input-examplePrompt-PromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_1-promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-fewShotPromptTemplate_1-fewShotPromptTemplate_1-input-examplePrompt-PromptTemplate",
"data": {
"label": ""
}
},
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-llmChain_1-llmChain_1-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "fewShotPromptTemplate_1",
"sourceHandle": "fewShotPromptTemplate_1-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "fewShotPromptTemplate_1-fewShotPromptTemplate_1-output-fewShotPromptTemplate-FewShotPromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_1-llmChain_1-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,650 @@
{
"description": "Use AutoGPT - Autonomous agent with chain of thoughts for self-guided task completion",
"nodes": [
{
"width": 300,
"height": 629,
"id": "autoGPT_0",
"position": {
"x": 1627.8124366169843,
"y": 129.76619452400155
},
"type": "customNode",
"data": {
"id": "autoGPT_0",
"label": "AutoGPT",
"name": "autoGPT",
"type": "AutoGPT",
"baseClasses": ["AutoGPT"],
"category": "Agents",
"description": "Autonomous agent with chain of thoughts by GPT4",
"inputParams": [
{
"label": "AutoGPT Name",
"name": "aiName",
"type": "string",
"placeholder": "Tom",
"optional": true,
"id": "autoGPT_0-input-aiName-string"
},
{
"label": "AutoGPT Role",
"name": "aiRole",
"type": "string",
"placeholder": "Assistant",
"optional": true,
"id": "autoGPT_0-input-aiRole-string"
},
{
"label": "Maximum Loop",
"name": "maxLoop",
"type": "number",
"default": 5,
"optional": true,
"id": "autoGPT_0-input-maxLoop-number"
}
],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "autoGPT_0-input-tools-Tool"
},
{
"label": "Chat Model",
"name": "model",
"type": "BaseChatModel",
"id": "autoGPT_0-input-model-BaseChatModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "autoGPT_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"tools": ["{{readFile_0.data.instance}}", "{{writeFile_1.data.instance}}", "{{serpAPI_0.data.instance}}"],
"model": "{{chatOpenAI_1.data.instance}}",
"vectorStoreRetriever": "{{pineconeExistingIndex_1.data.instance}}",
"aiName": "",
"aiRole": "",
"maxLoop": 5
},
"outputAnchors": [
{
"id": "autoGPT_0-output-autoGPT-AutoGPT",
"name": "autoGPT",
"label": "AutoGPT",
"type": "AutoGPT"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1627.8124366169843,
"y": 129.76619452400155
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "chatOpenAI_1",
"position": {
"x": 168.57515834535457,
"y": -90.74139976987627
},
"type": "customNode",
"data": {
"id": "chatOpenAI_1",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0",
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 168.57515834535457,
"y": -90.74139976987627
},
"dragging": false
},
{
"width": 300,
"height": 279,
"id": "writeFile_1",
"position": {
"x": 546.3440710182241,
"y": 55.28691941459434
},
"type": "customNode",
"data": {
"id": "writeFile_1",
"label": "Write File",
"name": "writeFile",
"type": "WriteFile",
"baseClasses": ["WriteFile", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Write file to disk",
"inputParams": [
{
"label": "Base Path",
"name": "basePath",
"placeholder": "C:\\Users\\User\\Desktop",
"type": "string",
"optional": true,
"id": "writeFile_1-input-basePath-string"
}
],
"inputAnchors": [],
"inputs": {
"basePath": ""
},
"outputAnchors": [
{
"id": "writeFile_1-output-writeFile-WriteFile|Tool|StructuredTool|BaseLangChain",
"name": "writeFile",
"label": "WriteFile",
"type": "WriteFile | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 546.3440710182241,
"y": 55.28691941459434
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 279,
"id": "readFile_0",
"position": {
"x": 881.2568465391292,
"y": -112.9631005153393
},
"type": "customNode",
"data": {
"id": "readFile_0",
"label": "Read File",
"name": "readFile",
"type": "ReadFile",
"baseClasses": ["ReadFile", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Read file from disk",
"inputParams": [
{
"label": "Base Path",
"name": "basePath",
"placeholder": "C:\\Users\\User\\Desktop",
"type": "string",
"optional": true,
"id": "readFile_0-input-basePath-string"
}
],
"inputAnchors": [],
"inputs": {
"basePath": ""
},
"outputAnchors": [
{
"id": "readFile_0-output-readFile-ReadFile|Tool|StructuredTool|BaseLangChain",
"name": "readFile",
"label": "ReadFile",
"type": "ReadFile | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 881.2568465391292,
"y": -112.9631005153393
},
"dragging": false
},
{
"width": 300,
"height": 279,
"id": "serpAPI_0",
"position": {
"x": 1244.740380161344,
"y": -193.9135818023827
},
"type": "customNode",
"data": {
"id": "serpAPI_0",
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["SerpAPI", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
{
"label": "Serp Api Key",
"name": "apiKey",
"type": "password",
"id": "serpAPI_0-input-apiKey-password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_0-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"name": "serpAPI",
"label": "SerpAPI",
"type": "SerpAPI | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1244.740380161344,
"y": -193.9135818023827
},
"dragging": false
},
{
"width": 300,
"height": 331,
"id": "openAIEmbeddings_0",
"position": {
"x": 530.4714276286077,
"y": 487.0228196121594
},
"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",
"id": "openAIEmbeddings_0-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 530.4714276286077,
"y": 487.0228196121594
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 652,
"id": "pineconeExistingIndex_1",
"position": {
"x": 943.1601557586332,
"y": 404.9622062733608
},
"type": "customNode",
"data": {
"id": "pineconeExistingIndex_1",
"label": "Pinecone Load Existing Index",
"name": "pineconeExistingIndex",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Pinecone (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeExistingIndex_1-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeExistingIndex_1-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeExistingIndex_1-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_1-input-pineconeNamespace-string"
},
{
"label": "Pinecone Metadata Filter",
"name": "pineconeMetadataFilter",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_1-input-pineconeMetadataFilter-json"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeExistingIndex_1-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeExistingIndex_1-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
"pineconeEnv": "us-west4-gcp",
"pineconeIndex": "",
"pineconeNamespace": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeExistingIndex_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeExistingIndex_1-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 943.1601557586332,
"y": 404.9622062733608
},
"dragging": false
}
],
"edges": [
{
"source": "pineconeExistingIndex_1",
"sourceHandle": "pineconeExistingIndex_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"target": "autoGPT_0",
"targetHandle": "autoGPT_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeExistingIndex_1-pineconeExistingIndex_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-autoGPT_0-autoGPT_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeExistingIndex_1",
"targetHandle": "pineconeExistingIndex_1-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeExistingIndex_1-pineconeExistingIndex_1-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_1",
"sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "autoGPT_0",
"targetHandle": "autoGPT_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-autoGPT_0-autoGPT_0-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "writeFile_1",
"sourceHandle": "writeFile_1-output-writeFile-WriteFile|Tool|StructuredTool|BaseLangChain",
"target": "autoGPT_0",
"targetHandle": "autoGPT_0-input-tools-Tool",
"type": "buttonedge",
"id": "writeFile_1-writeFile_1-output-writeFile-WriteFile|Tool|StructuredTool|BaseLangChain-autoGPT_0-autoGPT_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "readFile_0",
"sourceHandle": "readFile_0-output-readFile-ReadFile|Tool|StructuredTool|BaseLangChain",
"target": "autoGPT_0",
"targetHandle": "autoGPT_0-input-tools-Tool",
"type": "buttonedge",
"id": "readFile_0-readFile_0-output-readFile-ReadFile|Tool|StructuredTool|BaseLangChain-autoGPT_0-autoGPT_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_0",
"sourceHandle": "serpAPI_0-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"target": "autoGPT_0",
"targetHandle": "autoGPT_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain-autoGPT_0-autoGPT_0-input-tools-Tool",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,447 @@
{
"description": "Use BabyAGI to create tasks and reprioritize for a given objective",
"nodes": [
{
"width": 300,
"height": 331,
"id": "openAIEmbeddings_1",
"position": {
"x": -84.60344342694289,
"y": -189.6930708050951
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_1",
"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",
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": -84.60344342694289,
"y": -189.6930708050951
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 652,
"id": "pineconeExistingIndex_1",
"position": {
"x": 264.729293346415,
"y": -190.36689763560724
},
"type": "customNode",
"data": {
"id": "pineconeExistingIndex_1",
"label": "Pinecone Load Existing Index",
"name": "pineconeExistingIndex",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Pinecone (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeExistingIndex_1-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeExistingIndex_1-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeExistingIndex_1-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_1-input-pineconeNamespace-string"
},
{
"label": "Pinecone Metadata Filter",
"name": "pineconeMetadataFilter",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_1-input-pineconeMetadataFilter-json"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeExistingIndex_1-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeExistingIndex_1-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
"pineconeEnv": "us-west4-gcp",
"pineconeIndex": "",
"pineconeNamespace": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeExistingIndex_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeExistingIndex_1-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "vectorStore"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 264.729293346415,
"y": -190.36689763560724
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "chatOpenAI_1",
"position": {
"x": 590.3367401418911,
"y": -374.0329977259934
},
"type": "customNode",
"data": {
"id": "chatOpenAI_1",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0",
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 590.3367401418911,
"y": -374.0329977259934
}
},
{
"width": 300,
"height": 380,
"id": "babyAGI_1",
"position": {
"x": 950.8042093214954,
"y": 66.00028106865324
},
"type": "customNode",
"data": {
"id": "babyAGI_1",
"label": "BabyAGI",
"name": "babyAGI",
"type": "BabyAGI",
"baseClasses": ["BabyAGI"],
"category": "Agents",
"description": "Task Driven Autonomous Agent which creates new task and reprioritizes task list based on objective",
"inputParams": [
{
"label": "Task Loop",
"name": "taskLoop",
"type": "number",
"default": 3,
"id": "babyAGI_1-input-taskLoop-number"
}
],
"inputAnchors": [
{
"label": "Chat Model",
"name": "model",
"type": "BaseChatModel",
"id": "babyAGI_1-input-model-BaseChatModel"
},
{
"label": "Vector Store",
"name": "vectorStore",
"type": "VectorStore",
"id": "babyAGI_1-input-vectorStore-VectorStore"
}
],
"inputs": {
"model": "{{chatOpenAI_1.data.instance}}",
"vectorStore": "{{pineconeExistingIndex_1.data.instance}}",
"taskLoop": 3
},
"outputAnchors": [
{
"id": "babyAGI_1-output-babyAGI-BabyAGI",
"name": "babyAGI",
"label": "BabyAGI",
"type": "BabyAGI"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 950.8042093214954,
"y": 66.00028106865324
}
}
],
"edges": [
{
"source": "openAIEmbeddings_1",
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeExistingIndex_1",
"targetHandle": "pineconeExistingIndex_1-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeExistingIndex_1-pineconeExistingIndex_1-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_1",
"sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "babyAGI_1",
"targetHandle": "babyAGI_1-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-babyAGI_1-babyAGI_1-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "pineconeExistingIndex_1",
"sourceHandle": "pineconeExistingIndex_1-output-vectorStore-Pinecone|VectorStore",
"target": "babyAGI_1",
"targetHandle": "babyAGI_1-input-vectorStore-VectorStore",
"type": "buttonedge",
"id": "pineconeExistingIndex_1-pineconeExistingIndex_1-output-vectorStore-Pinecone|VectorStore-babyAGI_1-babyAGI_1-input-vectorStore-VectorStore",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,455 @@
{
"description": "Use ChatGPT Plugins within LangChain abstractions with GET and POST Tools",
"nodes": [
{
"width": 300,
"height": 278,
"id": "aiPlugin_0",
"position": {
"x": 1086.2925487205378,
"y": 84.92168014974317
},
"type": "customNode",
"data": {
"id": "aiPlugin_0",
"label": "AI Plugin",
"name": "aiPlugin",
"type": "AIPlugin",
"baseClasses": ["AIPlugin", "Tool"],
"category": "Tools",
"description": "Execute actions using ChatGPT Plugin Url",
"inputParams": [
{
"label": "Plugin Url",
"name": "pluginUrl",
"type": "string",
"placeholder": "https://www.klarna.com/.well-known/ai-plugin.json"
}
],
"inputAnchors": [],
"inputs": {
"pluginUrl": "https://www.klarna.com/.well-known/ai-plugin.json"
},
"outputAnchors": [
{
"id": "aiPlugin_0-output-aiPlugin-AIPlugin|Tool",
"name": "aiPlugin",
"label": "AIPlugin",
"type": "AIPlugin | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1086.2925487205378,
"y": 84.92168014974317
},
"dragging": false
},
{
"width": 300,
"height": 251,
"id": "requestsGet_0",
"position": {
"x": 761.713884489628,
"y": 170.84830553778124
},
"type": "customNode",
"data": {
"id": "requestsGet_0",
"label": "Requests Get",
"name": "requestsGet",
"type": "RequestsGet",
"baseClasses": ["RequestsGet", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Execute HTTP GET requests",
"inputParams": [
{
"label": "URL",
"name": "url",
"type": "string",
"description": "Agent will make call to this exact URL. If not specified, agent will try to figure out itself from AIPlugin if provided",
"additionalParams": true,
"optional": true,
"id": "requestsGet_0-input-url-string"
},
{
"label": "Description",
"name": "description",
"type": "string",
"rows": 4,
"default": "A portal to the internet. Use this when you need to get specific content from a website. \nInput should be a url (i.e. https://www.google.com). The output will be the text response of the GET request.",
"description": "Acts like a prompt to tell agent when it should use this tool",
"additionalParams": true,
"optional": true,
"id": "requestsGet_0-input-description-string"
},
{
"label": "Headers",
"name": "headers",
"type": "json",
"additionalParams": true,
"optional": true,
"id": "requestsGet_0-input-headers-json"
}
],
"inputAnchors": [],
"inputs": {
"url": "",
"description": "A portal to the internet. Use this when you need to get specific content from a website. \nInput should be a url (i.e. https://www.google.com). The output will be the text response of the GET request.",
"headers": ""
},
"outputAnchors": [
{
"id": "requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain",
"name": "requestsGet",
"label": "RequestsGet",
"type": "RequestsGet | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 761.713884489628,
"y": 170.84830553778124
},
"dragging": false
},
{
"width": 300,
"height": 251,
"id": "requestsPost_0",
"position": {
"x": 436.4125209312256,
"y": 306.87715502984184
},
"type": "customNode",
"data": {
"id": "requestsPost_0",
"label": "Requests Post",
"name": "requestsPost",
"type": "RequestsPost",
"baseClasses": ["RequestsPost", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Execute HTTP POST requests",
"inputParams": [
{
"label": "URL",
"name": "url",
"type": "string",
"description": "Agent will make call to this exact URL. If not specified, agent will try to figure out itself from AIPlugin if provided",
"additionalParams": true,
"optional": true,
"id": "requestsPost_0-input-url-string"
},
{
"label": "Body",
"name": "body",
"type": "json",
"description": "JSON body for the POST request. If not specified, agent will try to figure out itself from AIPlugin if provided",
"additionalParams": true,
"optional": true,
"id": "requestsPost_0-input-body-json"
},
{
"label": "Description",
"name": "description",
"type": "string",
"rows": 4,
"default": "Use this when you want to POST to a website.\nInput should be a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \nkey-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string\nThe output will be the text response of the POST request.",
"description": "Acts like a prompt to tell agent when it should use this tool",
"additionalParams": true,
"optional": true,
"id": "requestsPost_0-input-description-string"
},
{
"label": "Headers",
"name": "headers",
"type": "json",
"additionalParams": true,
"optional": true,
"id": "requestsPost_0-input-headers-json"
}
],
"inputAnchors": [],
"inputs": {
"url": "",
"body": "",
"description": "Use this when you want to POST to a website.\nInput should be a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \nkey-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string\nThe output will be the text response of the POST request.",
"headers": ""
},
"outputAnchors": [
{
"id": "requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain",
"name": "requestsPost",
"label": "RequestsPost",
"type": "RequestsPost | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 436.4125209312256,
"y": 306.87715502984184
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "mrklAgentChat_0",
"position": {
"x": 1416.2054860029416,
"y": 451.43299014109715
},
"type": "customNode",
"data": {
"id": "mrklAgentChat_0",
"label": "MRKL Agent for Chat Models",
"name": "mrklAgentChat",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain", "BaseLangChain"],
"category": "Agents",
"description": "Agent that uses the ReAct Framework to decide what action to take, optimized to be used with Chat Models",
"inputParams": [],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "mrklAgentChat_0-input-tools-Tool"
},
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "mrklAgentChat_0-input-model-BaseLanguageModel"
}
],
"inputs": {
"tools": ["{{requestsGet_0.data.instance}}", "{{requestsPost_0.data.instance}}", "{{aiPlugin_0.data.instance}}"],
"model": "{{chatOpenAI_0.data.instance}}"
},
"outputAnchors": [
{
"id": "mrklAgentChat_0-output-mrklAgentChat-AgentExecutor|BaseChain|BaseLangChain",
"name": "mrklAgentChat",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1416.2054860029416,
"y": 451.43299014109715
},
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 797.0574814814245,
"y": 578.7641992971934
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 797.0574814814245,
"y": 578.7641992971934
},
"dragging": false
}
],
"edges": [
{
"source": "requestsGet_0",
"sourceHandle": "requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain",
"target": "mrklAgentChat_0",
"targetHandle": "mrklAgentChat_0-input-tools-Tool",
"type": "buttonedge",
"id": "requestsGet_0-requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "aiPlugin_0",
"sourceHandle": "aiPlugin_0-output-aiPlugin-AIPlugin|Tool",
"target": "mrklAgentChat_0",
"targetHandle": "mrklAgentChat_0-input-tools-Tool",
"type": "buttonedge",
"id": "aiPlugin_0-aiPlugin_0-output-aiPlugin-AIPlugin|Tool-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "requestsPost_0",
"sourceHandle": "requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain",
"target": "mrklAgentChat_0",
"targetHandle": "mrklAgentChat_0-input-tools-Tool",
"type": "buttonedge",
"id": "requestsPost_0-requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "mrklAgentChat_0",
"targetHandle": "mrklAgentChat_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-mrklAgentChat_0-mrklAgentChat_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,424 @@
{
"description": "A conversational agent for a chat model which utilize chat specific prompts",
"nodes": [
{
"width": 300,
"height": 524,
"id": "chatOpenAI_1",
"position": {
"x": 56.646518061018355,
"y": 71.07043412525425
},
"type": "customNode",
"data": {
"id": "chatOpenAI_1",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0",
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 56.646518061018355,
"y": 71.07043412525425
},
"dragging": false
},
{
"width": 300,
"height": 278,
"id": "serpAPI_1",
"position": {
"x": 436.94138168947336,
"y": 39.517825311262044
},
"type": "customNode",
"data": {
"id": "serpAPI_1",
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["SerpAPI", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
{
"label": "Serp Api Key",
"name": "apiKey",
"type": "password",
"id": "serpAPI_1-input-apiKey-password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"name": "serpAPI",
"label": "SerpAPI",
"type": "SerpAPI | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 436.94138168947336,
"y": 39.517825311262044
},
"dragging": false
},
{
"width": 300,
"height": 143,
"id": "calculator_1",
"position": {
"x": 800.5125025564965,
"y": 72.40592063242738
},
"type": "customNode",
"data": {
"id": "calculator_1",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Calculator", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain",
"name": "calculator",
"label": "Calculator",
"type": "Calculator | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 800.5125025564965,
"y": 72.40592063242738
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "bufferMemory_1",
"position": {
"x": 573.479796337051,
"y": 575.8843338367278
},
"type": "customNode",
"data": {
"id": "bufferMemory_1",
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Remembers previous conversational back and forths directly",
"inputParams": [
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history",
"id": "bufferMemory_1-input-memoryKey-string"
},
{
"label": "Input Key",
"name": "inputKey",
"type": "string",
"default": "input",
"id": "bufferMemory_1-input-inputKey-string"
}
],
"inputAnchors": [],
"inputs": {
"memoryKey": "chat_history",
"inputKey": "input"
},
"outputAnchors": [
{
"id": "bufferMemory_1-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 573.479796337051,
"y": 575.8843338367278
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 383,
"id": "conversationalAgent_0",
"position": {
"x": 1206.1996037716035,
"y": 227.39579577603587
},
"type": "customNode",
"data": {
"id": "conversationalAgent_0",
"label": "Conversational Agent",
"name": "conversationalAgent",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain", "BaseLangChain"],
"category": "Agents",
"description": "Conversational agent for a chat model. It will utilize chat specific prompts",
"inputParams": [
{
"label": "System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"optional": true,
"additionalParams": true,
"id": "conversationalAgent_0-input-systemMessage-string"
},
{
"label": "Human Message",
"name": "humanMessage",
"type": "string",
"rows": 4,
"optional": true,
"additionalParams": true,
"id": "conversationalAgent_0-input-humanMessage-string"
}
],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "conversationalAgent_0-input-tools-Tool"
},
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalAgent_0-input-model-BaseLanguageModel"
},
{
"label": "Memory",
"name": "memory",
"type": "BaseChatMemory",
"id": "conversationalAgent_0-input-memory-BaseChatMemory"
}
],
"inputs": {
"tools": ["{{calculator_1.data.instance}}", "{{serpAPI_1.data.instance}}"],
"model": "{{chatOpenAI_1.data.instance}}",
"memory": "{{bufferMemory_1.data.instance}}",
"systemMessage": "",
"humanMessage": ""
},
"outputAnchors": [
{
"id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor|BaseChain|BaseLangChain",
"name": "conversationalAgent",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1206.1996037716035,
"y": 227.39579577603587
},
"dragging": false
}
],
"edges": [
{
"source": "calculator_1",
"sourceHandle": "calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_1-calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_1",
"sourceHandle": "serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_1-serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_1",
"sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_1",
"sourceHandle": "bufferMemory_1-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-memory-BaseChatMemory",
"type": "buttonedge",
"id": "bufferMemory_1-bufferMemory_1-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,624 @@
{
"description": "Text file QnA using conversational retrieval QA chain",
"nodes": [
{
"width": 300,
"height": 376,
"id": "recursiveCharacterTextSplitter_1",
"position": {
"x": 422.81091375202413,
"y": 122.99825010325736
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_1",
"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": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 422.81091375202413,
"y": 122.99825010325736
},
"dragging": false
},
{
"width": 300,
"height": 392,
"id": "textFile_1",
"position": {
"x": 810.6456923854021,
"y": 61.45989039390216
},
"type": "customNode",
"data": {
"id": "textFile_1",
"label": "Text File",
"name": "textFile",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from text files",
"inputParams": [
{
"label": "Txt File",
"name": "txtFile",
"type": "file",
"fileType": ".txt",
"id": "textFile_1-input-txtFile-file"
},
{
"label": "Metadata",
"name": "metadata",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "textFile_1-input-metadata-json"
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "textFile_1-input-textSplitter-TextSplitter"
}
],
"inputs": {
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}"
},
"outputAnchors": [
{
"id": "textFile_1-output-textFile-Document",
"name": "textFile",
"label": "Document",
"type": "Document"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 810.6456923854021,
"y": 61.45989039390216
},
"dragging": false
},
{
"width": 300,
"height": 330,
"id": "openAIEmbeddings_1",
"position": {
"x": 817.2208258595176,
"y": 586.8095386455508
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_1",
"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",
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 817.2208258595176,
"y": 586.8095386455508
},
"dragging": false
},
{
"width": 300,
"height": 702,
"id": "pineconeUpsert_1",
"position": {
"x": 1201.3427203075867,
"y": 545.1800202023215
},
"type": "customNode",
"data": {
"id": "pineconeUpsert_1",
"label": "Pinecone Upsert Document",
"name": "pineconeUpsert",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Upsert documents to Pinecone",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeUpsert_1-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeUpsert_1-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeUpsert_1-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeUpsert_1-input-pineconeNamespace-string"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeUpsert_1-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Document",
"name": "document",
"type": "Document",
"list": true,
"id": "pineconeUpsert_1-input-document-Document"
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeUpsert_1-input-embeddings-Embeddings"
}
],
"inputs": {
"document": ["{{textFile_1.data.instance}}"],
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
"pineconeEnv": "us-west4-gcp",
"pineconeIndex": "myindex",
"pineconeNamespace": "mynamespace"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeUpsert_1-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 1201.3427203075867,
"y": 545.1800202023215
}
},
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 1200.565568471151,
"y": -33.648143275380406
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0.5",
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1200.565568471151,
"y": -33.648143275380406
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1627.1855024401737,
"y": 394.42287890442145
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
},
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". You will provide me with answers from the given info. If the answer is not included, say exactly \"Hmm, I am not sure.\" and stop after that. Refuse to answer any question not about the info. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-systemMessagePrompt-string"
},
{
"label": "Chain Option",
"name": "chainOption",
"type": "options",
"options": [
{
"label": "MapReduceDocumentsChain",
"name": "map_reduce",
"description": "Suitable for QA tasks over larger documents and can run the preprocessing step in parallel, reducing the running time"
},
{
"label": "RefineDocumentsChain",
"name": "refine",
"description": "Suitable for QA tasks over a large number of documents."
},
{
"label": "StuffDocumentsChain",
"name": "stuff",
"description": "Suitable for QA tasks over a small number of documents."
}
],
"additionalParams": true,
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-chainOption-options"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"vectorStoreRetriever": "{{pineconeUpsert_1.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1627.1855024401737,
"y": 394.42287890442145
},
"dragging": false
}
],
"edges": [
{
"source": "openAIEmbeddings_1",
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeUpsert_1",
"targetHandle": "pineconeUpsert_1-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_1-pineconeUpsert_1-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "textFile_1",
"sourceHandle": "textFile_1-output-textFile-Document",
"target": "pineconeUpsert_1",
"targetHandle": "pineconeUpsert_1-input-document-Document",
"type": "buttonedge",
"id": "textFile_1-textFile_1-output-textFile-Document-pineconeUpsert_1-pineconeUpsert_1-input-document-Document",
"data": {
"label": ""
}
},
{
"source": "recursiveCharacterTextSplitter_1",
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "textFile_1",
"targetHandle": "textFile_1-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_1-textFile_1-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_1",
"sourceHandle": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_1-pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,641 @@
{
"description": "Github repo QnA using conversational retrieval QA chain",
"nodes": [
{
"width": 300,
"height": 376,
"id": "recursiveCharacterTextSplitter_1",
"position": {
"x": 447.1038086695898,
"y": 126.52301921543597
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_1",
"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": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 447.1038086695898,
"y": 126.52301921543597
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 578,
"id": "github_1",
"position": {
"x": 836.9660489009947,
"y": -44.04171088580361
},
"type": "customNode",
"data": {
"id": "github_1",
"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",
"id": "github_1-input-repoLink-string"
},
{
"label": "Branch",
"name": "branch",
"type": "string",
"default": "main",
"id": "github_1-input-branch-string"
},
{
"label": "Access Token",
"name": "accessToken",
"type": "password",
"placeholder": "<GITHUB_ACCESS_TOKEN>",
"optional": true,
"id": "github_1-input-accessToken-password"
},
{
"label": "Metadata",
"name": "metadata",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "github_1-input-metadata-json"
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "github_1-input-textSplitter-TextSplitter"
}
],
"inputs": {
"repoLink": "",
"branch": "main",
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}"
},
"outputAnchors": [
{
"id": "github_1-output-github-Document",
"name": "github",
"label": "Document",
"type": "Document"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 836.9660489009947,
"y": -44.04171088580361
},
"dragging": false
},
{
"width": 300,
"height": 330,
"id": "openAIEmbeddings_1",
"position": {
"x": 833.4085562012468,
"y": 541.7875676090047
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_1",
"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",
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 833.4085562012468,
"y": 541.7875676090047
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 702,
"id": "pineconeUpsert_1",
"position": {
"x": 1268.7946529279823,
"y": 382.77997896801634
},
"type": "customNode",
"data": {
"id": "pineconeUpsert_1",
"label": "Pinecone Upsert Document",
"name": "pineconeUpsert",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Upsert documents to Pinecone",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeUpsert_1-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeUpsert_1-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeUpsert_1-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeUpsert_1-input-pineconeNamespace-string"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeUpsert_1-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Document",
"name": "document",
"type": "Document",
"list": true,
"id": "pineconeUpsert_1-input-document-Document"
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeUpsert_1-input-embeddings-Embeddings"
}
],
"inputs": {
"document": ["{{github_1.data.instance}}"],
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
"pineconeEnv": "us-west4-gcp",
"pineconeIndex": "myindex",
"pineconeNamespace": "mynamespace"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeUpsert_1-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 1268.7946529279823,
"y": 382.77997896801634
}
},
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 1271.1300438358664,
"y": -169.75707425097968
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": "0.5",
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1271.1300438358664,
"y": -169.75707425097968
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1653.6177539108153,
"y": 266.4856653480158
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
},
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". You will provide me with answers from the given info. If the answer is not included, say exactly \"Hmm, I am not sure.\" and stop after that. Refuse to answer any question not about the info. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-systemMessagePrompt-string"
},
{
"label": "Chain Option",
"name": "chainOption",
"type": "options",
"options": [
{
"label": "MapReduceDocumentsChain",
"name": "map_reduce",
"description": "Suitable for QA tasks over larger documents and can run the preprocessing step in parallel, reducing the running time"
},
{
"label": "RefineDocumentsChain",
"name": "refine",
"description": "Suitable for QA tasks over a large number of documents."
},
{
"label": "StuffDocumentsChain",
"name": "stuff",
"description": "Suitable for QA tasks over a small number of documents."
}
],
"additionalParams": true,
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-chainOption-options"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"vectorStoreRetriever": "{{pineconeUpsert_1.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1653.6177539108153,
"y": 266.4856653480158
},
"dragging": false
}
],
"edges": [
{
"source": "github_1",
"sourceHandle": "github_1-output-github-Document",
"target": "pineconeUpsert_1",
"targetHandle": "pineconeUpsert_1-input-document-Document",
"type": "buttonedge",
"id": "github_1-github_1-output-github-Document-pineconeUpsert_1-pineconeUpsert_1-input-document-Document",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_1",
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeUpsert_1",
"targetHandle": "pineconeUpsert_1-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_1-pineconeUpsert_1-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "recursiveCharacterTextSplitter_1",
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "github_1",
"targetHandle": "github_1-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-github_1-github_1-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_1",
"sourceHandle": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_1-pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,274 @@
{
"description": "Simple LLM Chain using HuggingFace Inference API on falcon-7b-instruct model",
"nodes": [
{
"width": 300,
"height": 532,
"id": "promptTemplate_1",
"position": {
"x": 514.5434056794296,
"y": 507.47798128037107
},
"type": "customNode",
"data": {
"id": "promptTemplate_1",
"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": 4,
"placeholder": "What is a good name for a company that makes {product}?",
"id": "promptTemplate_1-input-template-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "promptTemplate_1-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"template": "Question: {question}\n\nAnswer: Let's think step by step.",
"promptValues": ""
},
"outputAnchors": [
{
"id": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 514.5434056794296,
"y": 507.47798128037107
},
"dragging": false
},
{
"width": 300,
"height": 405,
"id": "llmChain_1",
"position": {
"x": 970.9254258940236,
"y": 320.56761595884564
},
"type": "customNode",
"data": {
"id": "llmChain_1",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_1-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_1-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_1-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{huggingFaceInference_LLMs_0.data.instance}}",
"prompt": "{{promptTemplate_1.data.instance}}",
"chainName": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_1-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_1-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "llmChain"
},
"selected": false
},
"positionAbsolute": {
"x": 970.9254258940236,
"y": 320.56761595884564
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 427,
"id": "huggingFaceInference_LLMs_0",
"position": {
"x": 503.5630827259226,
"y": 50.79125094823999
},
"type": "customNode",
"data": {
"id": "huggingFaceInference_LLMs_0",
"label": "HuggingFace Inference",
"name": "huggingFaceInference_LLMs",
"type": "HuggingFaceInference",
"baseClasses": ["HuggingFaceInference", "LLM", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around HuggingFace large language models",
"inputParams": [
{
"label": "Model",
"name": "model",
"type": "string",
"placeholder": "gpt2",
"id": "huggingFaceInference_LLMs_0-input-model-string"
},
{
"label": "HuggingFace Api Key",
"name": "apiKey",
"type": "password",
"id": "huggingFaceInference_LLMs_0-input-apiKey-password"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"description": "Temperature parameter may not apply to certain model. Please check available model parameters",
"optional": true,
"additionalParams": true,
"id": "huggingFaceInference_LLMs_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"description": "Max Tokens parameter may not apply to certain model. Please check available model parameters",
"optional": true,
"additionalParams": true,
"id": "huggingFaceInference_LLMs_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"description": "Top Probability parameter may not apply to certain model. Please check available model parameters",
"optional": true,
"additionalParams": true,
"id": "huggingFaceInference_LLMs_0-input-topP-number"
},
{
"label": "Top K",
"name": "hfTopK",
"type": "number",
"description": "Top K parameter may not apply to certain model. Please check available model parameters",
"optional": true,
"additionalParams": true,
"id": "huggingFaceInference_LLMs_0-input-hfTopK-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"description": "Frequency Penalty parameter may not apply to certain model. Please check available model parameters",
"optional": true,
"additionalParams": true,
"id": "huggingFaceInference_LLMs_0-input-frequencyPenalty-number"
}
],
"inputAnchors": [],
"inputs": {
"model": "tiiuae/falcon-7b-instruct",
"temperature": "",
"maxTokens": "200",
"topP": "",
"hfTopK": "10",
"frequencyPenalty": ""
},
"outputAnchors": [
{
"id": "huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "huggingFaceInference_LLMs",
"label": "HuggingFaceInference",
"type": "HuggingFaceInference | LLM | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 503.5630827259226,
"y": 50.79125094823999
},
"dragging": false
}
],
"edges": [
{
"source": "promptTemplate_1",
"sourceHandle": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_1-promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_1-llmChain_1-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
},
{
"source": "huggingFaceInference_LLMs_0",
"sourceHandle": "huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "huggingFaceInference_LLMs_0-huggingFaceInference_LLMs_0-output-huggingFaceInference_LLMs-HuggingFaceInference|LLM|BaseLLM|BaseLanguageModel|BaseLangChain-llmChain_1-llmChain_1-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,521 @@
{
"description": "QnA chain using local LLM, Embedding models, and Faiss local vector store",
"nodes": [
{
"width": 300,
"height": 376,
"id": "recursiveCharacterTextSplitter_1",
"position": {
"x": 422.81091375202413,
"y": 122.99825010325736
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_1",
"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": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 422.81091375202413,
"y": 122.99825010325736
},
"dragging": false
},
{
"width": 300,
"height": 428,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1634.455879160561,
"y": 428.77742668929807
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
},
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". You will provide me with answers from the given info. If the answer is not included, say exactly \"Hmm, I am not sure.\" and stop after that. Refuse to answer any question not about the info. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-systemMessagePrompt-string"
},
{
"label": "Chain Option",
"name": "chainOption",
"type": "options",
"options": [
{
"label": "MapReduceDocumentsChain",
"name": "map_reduce",
"description": "Suitable for QA tasks over larger documents and can run the preprocessing step in parallel, reducing the running time"
},
{
"label": "RefineDocumentsChain",
"name": "refine",
"description": "Suitable for QA tasks over a large number of documents."
},
{
"label": "StuffDocumentsChain",
"name": "stuff",
"description": "Suitable for QA tasks over a small number of documents."
}
],
"additionalParams": true,
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-chainOption-options"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"model": "{{chatLocalAI_0.data.instance}}",
"vectorStoreRetriever": "{{faissUpsert_0.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1634.455879160561,
"y": 428.77742668929807
},
"dragging": false
},
{
"width": 300,
"height": 456,
"id": "faissUpsert_0",
"position": {
"x": 1204.6898035516715,
"y": 521.0933926644659
},
"type": "customNode",
"data": {
"id": "faissUpsert_0",
"label": "Faiss Upsert Document",
"name": "faissUpsert",
"type": "Faiss",
"baseClasses": ["Faiss", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Upsert documents to Faiss",
"inputParams": [
{
"label": "Base Path to store",
"name": "basePath",
"description": "Path to store faiss.index file",
"placeholder": "C:\\Users\\User\\Desktop",
"type": "string",
"id": "faissUpsert_0-input-basePath-string"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "faissUpsert_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Document",
"name": "document",
"type": "Document",
"list": true,
"id": "faissUpsert_0-input-document-Document"
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "faissUpsert_0-input-embeddings-Embeddings"
}
],
"inputs": {
"document": ["{{textFile_0.data.instance}}"],
"embeddings": "{{localAIEmbeddings_0.data.instance}}",
"basePath": "C:\\Users\\your-folder",
"topK": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Faiss Retriever",
"type": "Faiss | VectorStoreRetriever | BaseRetriever"
},
{
"id": "faissUpsert_0-output-vectorStore-Faiss|SaveableVectorStore|VectorStore",
"name": "vectorStore",
"label": "Faiss Vector Store",
"type": "Faiss | SaveableVectorStore | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1204.6898035516715,
"y": 521.0933926644659
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "chatLocalAI_0",
"position": {
"x": 1191.9512064167336,
"y": -44.05401001663306
},
"type": "customNode",
"data": {
"id": "chatLocalAI_0",
"label": "ChatLocalAI",
"name": "chatLocalAI",
"type": "ChatLocalAI",
"baseClasses": ["ChatLocalAI", "BaseChatModel", "LLM", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Use local LLMs like llama.cpp, gpt4all using LocalAI",
"inputParams": [
{
"label": "Base Path",
"name": "basePath",
"type": "string",
"placeholder": "http://localhost:8080/v1",
"id": "chatLocalAI_0-input-basePath-string"
},
{
"label": "Model Name",
"name": "modelName",
"type": "string",
"placeholder": "gpt4all-lora-quantized.bin",
"id": "chatLocalAI_0-input-modelName-string"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatLocalAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatLocalAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatLocalAI_0-input-topP-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatLocalAI_0-input-timeout-number"
}
],
"inputAnchors": [],
"inputs": {
"basePath": "http://localhost:8080/v1",
"modelName": "ggml-gpt4all-j.bin",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "chatLocalAI",
"label": "ChatLocalAI",
"type": "ChatLocalAI | BaseChatModel | LLM | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1191.9512064167336,
"y": -44.05401001663306
},
"dragging": false
},
{
"width": 300,
"height": 410,
"id": "textFile_0",
"position": {
"x": 809.5432731751458,
"y": 55.85095796777051
},
"type": "customNode",
"data": {
"id": "textFile_0",
"label": "Text File",
"name": "textFile",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from text files",
"inputParams": [
{
"label": "Txt File",
"name": "txtFile",
"type": "file",
"fileType": ".txt",
"id": "textFile_0-input-txtFile-file"
},
{
"label": "Metadata",
"name": "metadata",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "textFile_0-input-metadata-json"
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "textFile_0-input-textSplitter-TextSplitter"
}
],
"inputs": {
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}",
"metadata": ""
},
"outputAnchors": [
{
"id": "textFile_0-output-textFile-Document",
"name": "textFile",
"label": "Document",
"type": "Document"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 809.5432731751458,
"y": 55.85095796777051
},
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "localAIEmbeddings_0",
"position": {
"x": 809.5432731751458,
"y": 507.4586304746849
},
"type": "customNode",
"data": {
"id": "localAIEmbeddings_0",
"label": "LocalAI Embeddings",
"name": "localAIEmbeddings",
"type": "LocalAI Embeddings",
"baseClasses": ["LocalAI Embeddings", "Embeddings"],
"category": "Embeddings",
"description": "Use local embeddings models like llama.cpp",
"inputParams": [
{
"label": "Base Path",
"name": "basePath",
"type": "string",
"placeholder": "http://localhost:8080/v1",
"id": "localAIEmbeddings_0-input-basePath-string"
},
{
"label": "Model Name",
"name": "modelName",
"type": "string",
"placeholder": "text-embedding-ada-002",
"id": "localAIEmbeddings_0-input-modelName-string"
}
],
"inputAnchors": [],
"inputs": {
"basePath": "http://localhost:8080/v1",
"modelName": "text-embedding-ada-002"
},
"outputAnchors": [
{
"id": "localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings",
"name": "localAIEmbeddings",
"label": "LocalAI Embeddings",
"type": "LocalAI Embeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 809.5432731751458,
"y": 507.4586304746849
},
"dragging": false
}
],
"edges": [
{
"source": "faissUpsert_0",
"sourceHandle": "faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "faissUpsert_0-faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
},
{
"source": "chatLocalAI_0",
"sourceHandle": "chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatLocalAI_0-chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "recursiveCharacterTextSplitter_1",
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "textFile_0",
"targetHandle": "textFile_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "textFile_0",
"sourceHandle": "textFile_0-output-textFile-Document",
"target": "faissUpsert_0",
"targetHandle": "faissUpsert_0-input-document-Document",
"type": "buttonedge",
"id": "textFile_0-textFile_0-output-textFile-Document-faissUpsert_0-faissUpsert_0-input-document-Document",
"data": {
"label": ""
}
},
{
"source": "localAIEmbeddings_0",
"sourceHandle": "localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings",
"target": "faissUpsert_0",
"targetHandle": "faissUpsert_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "localAIEmbeddings_0-localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings-faissUpsert_0-faissUpsert_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,331 @@
{
"description": "An agent that uses the React Framework to decide what action to take",
"nodes": [
{
"width": 300,
"height": 278,
"id": "serpAPI_1",
"position": {
"x": 312.0655985817535,
"y": 112.09909989842703
},
"type": "customNode",
"data": {
"id": "serpAPI_1",
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["SerpAPI", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
{
"label": "Serp Api Key",
"name": "apiKey",
"type": "password",
"id": "serpAPI_1-input-apiKey-password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"name": "serpAPI",
"label": "SerpAPI",
"type": "SerpAPI | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 312.0655985817535,
"y": 112.09909989842703
},
"dragging": false
},
{
"width": 300,
"height": 143,
"id": "calculator_1",
"position": {
"x": 664.1366474718458,
"y": 123.16419000640141
},
"type": "customNode",
"data": {
"id": "calculator_1",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Calculator", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain",
"name": "calculator",
"label": "Calculator",
"type": "Calculator | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 664.1366474718458,
"y": 123.16419000640141
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "openAI_1",
"position": {
"x": 663.1307301893027,
"y": 394.7618562930441
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 663.1307301893027,
"y": 394.7618562930441
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "mrklAgentLLM_0",
"position": {
"x": 1055.3271135179489,
"y": 245.36098016819074
},
"type": "customNode",
"data": {
"id": "mrklAgentLLM_0",
"label": "MRKL Agent for LLMs",
"name": "mrklAgentLLM",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain", "BaseLangChain"],
"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": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "mrklAgentLLM_0-input-model-BaseLanguageModel"
}
],
"inputs": {
"tools": ["{{calculator_1.data.instance}}", "{{serpAPI_1.data.instance}}"],
"model": "{{openAI_1.data.instance}}"
},
"outputAnchors": [
{
"id": "mrklAgentLLM_0-output-mrklAgentLLM-AgentExecutor|BaseChain|BaseLangChain",
"name": "mrklAgentLLM",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1055.3271135179489,
"y": 245.36098016819074
},
"dragging": false
}
],
"edges": [
{
"source": "calculator_1",
"sourceHandle": "calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_1-calculator_1-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain-mrklAgentLLM_0-mrklAgentLLM_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_1",
"sourceHandle": "serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_1-serpAPI_1-output-serpAPI-SerpAPI|Tool|StructuredTool|BaseLangChain-mrklAgentLLM_0-mrklAgentLLM_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-mrklAgentLLM_0-mrklAgentLLM_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,484 @@
{
"description": "Load existing index with metadata filters and feed into conversational retrieval QA chain",
"nodes": [
{
"width": 300,
"height": 524,
"id": "openAI_1",
"position": {
"x": 1195.6182217299724,
"y": -12.958591115085468
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": "0",
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 1195.6182217299724,
"y": -12.958591115085468
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 330,
"id": "openAIEmbeddings_1",
"position": {
"x": 777.5098693425334,
"y": 308.4221448953297
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_1",
"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",
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 777.5098693425334,
"y": 308.4221448953297
},
"dragging": false
},
{
"width": 300,
"height": 703,
"id": "pineconeExistingIndex_0",
"position": {
"x": 1187.519066203033,
"y": 542.6635399602128
},
"type": "customNode",
"data": {
"id": "pineconeExistingIndex_0",
"label": "Pinecone Load Existing Index",
"name": "pineconeExistingIndex",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Pinecone (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeExistingIndex_0-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeExistingIndex_0-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeExistingIndex_0-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_0-input-pineconeNamespace-string"
},
{
"label": "Pinecone Metadata Filter",
"name": "pineconeMetadataFilter",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_0-input-pineconeMetadataFilter-json"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeExistingIndex_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeExistingIndex_0-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
"pineconeEnv": "northamerica-northeast1-gcp",
"pineconeIndex": "myindex",
"pineconeNamespace": "my-namespace",
"pineconeMetadataFilter": "{\"id\":\"doc1\"}"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeExistingIndex_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeExistingIndex_0-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1187.519066203033,
"y": 542.6635399602128
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1585.900129303412,
"y": 405.9784391258126
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
},
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". You will provide me with answers from the given info. If the answer is not included, say exactly \"Hmm, I am not sure.\" and stop after that. Refuse to answer any question not about the info. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-systemMessagePrompt-string"
},
{
"label": "Chain Option",
"name": "chainOption",
"type": "options",
"options": [
{
"label": "MapReduceDocumentsChain",
"name": "map_reduce",
"description": "Suitable for QA tasks over larger documents and can run the preprocessing step in parallel, reducing the running time"
},
{
"label": "RefineDocumentsChain",
"name": "refine",
"description": "Suitable for QA tasks over a large number of documents."
},
{
"label": "StuffDocumentsChain",
"name": "stuff",
"description": "Suitable for QA tasks over a small number of documents."
}
],
"additionalParams": true,
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-chainOption-options"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"model": "{{openAI_1.data.instance}}",
"vectorStoreRetriever": "{{pineconeExistingIndex_0.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1585.900129303412,
"y": 405.9784391258126
},
"dragging": false
}
],
"edges": [
{
"source": "openAIEmbeddings_1",
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeExistingIndex_0",
"targetHandle": "pineconeExistingIndex_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeExistingIndex_0-pineconeExistingIndex_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeExistingIndex_0",
"sourceHandle": "pineconeExistingIndex_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeExistingIndex_0-pineconeExistingIndex_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,732 @@
{
"description": "Upsert multiple files with metadata filters and feed into conversational retrieval QA chain",
"nodes": [
{
"width": 300,
"height": 376,
"id": "recursiveCharacterTextSplitter_1",
"position": {
"x": 347.5233039646277,
"y": 129.29305204134062
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_1",
"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": "Chunk Size",
"name": "chunkSize",
"type": "number",
"default": 1000,
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"optional": true,
"id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter | TextSplitter"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 347.5233039646277,
"y": 129.29305204134062
},
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "openAI_1",
"position": {
"x": 1159.184721109528,
"y": -38.76565405456694
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": "0",
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 1159.184721109528,
"y": -38.76565405456694
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 330,
"id": "openAIEmbeddings_1",
"position": {
"x": 749.4044250705479,
"y": 858.4858399327618
},
"type": "customNode",
"data": {
"id": "openAIEmbeddings_1",
"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",
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 749.4044250705479,
"y": 858.4858399327618
},
"dragging": false
},
{
"width": 300,
"height": 392,
"id": "textFile_0",
"position": {
"x": 756.5586098635717,
"y": -121.81747478707992
},
"type": "customNode",
"data": {
"id": "textFile_0",
"label": "Text File",
"name": "textFile",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from text files",
"inputParams": [
{
"label": "Txt File",
"name": "txtFile",
"type": "file",
"fileType": ".txt",
"id": "textFile_0-input-txtFile-file"
},
{
"label": "Metadata",
"name": "metadata",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "textFile_0-input-metadata-json"
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "textFile_0-input-textSplitter-TextSplitter"
}
],
"inputs": {
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}",
"metadata": "{\"id\":\"doc1\"}"
},
"outputAnchors": [
{
"id": "textFile_0-output-textFile-Document",
"name": "textFile",
"label": "Document",
"type": "Document"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 756.5586098635717,
"y": -121.81747478707992
},
"dragging": false
},
{
"width": 300,
"height": 488,
"id": "pdfFile_0",
"position": {
"x": 752.0044222860163,
"y": 318.11704520478617
},
"type": "customNode",
"data": {
"id": "pdfFile_0",
"label": "Pdf File",
"name": "pdfFile",
"type": "Document",
"baseClasses": ["Document"],
"category": "Document Loaders",
"description": "Load data from PDF files",
"inputParams": [
{
"label": "Pdf File",
"name": "pdfFile",
"type": "file",
"fileType": ".pdf",
"id": "pdfFile_0-input-pdfFile-file"
},
{
"label": "Usage",
"name": "usage",
"type": "options",
"options": [
{
"label": "One document per page",
"name": "perPage"
},
{
"label": "One document per file",
"name": "perFile"
}
],
"default": "perPage",
"id": "pdfFile_0-input-usage-options"
},
{
"label": "Metadata",
"name": "metadata",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "pdfFile_0-input-metadata-json"
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "pdfFile_0-input-textSplitter-TextSplitter"
}
],
"inputs": {
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}",
"usage": "perPage",
"metadata": "{\"id\":\"doc2\"}"
},
"outputAnchors": [
{
"id": "pdfFile_0-output-pdfFile-Document",
"name": "pdfFile",
"label": "Document",
"type": "Document"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 752.0044222860163,
"y": 318.11704520478617
},
"dragging": false
},
{
"width": 300,
"height": 702,
"id": "pineconeUpsert_0",
"position": {
"x": 1161.8813042660154,
"y": 537.0216614326227
},
"type": "customNode",
"data": {
"id": "pineconeUpsert_0",
"label": "Pinecone Upsert Document",
"name": "pineconeUpsert",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Upsert documents to Pinecone",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeUpsert_0-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeUpsert_0-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeUpsert_0-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeUpsert_0-input-pineconeNamespace-string"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeUpsert_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Document",
"name": "document",
"type": "Document",
"list": true,
"id": "pineconeUpsert_0-input-document-Document"
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeUpsert_0-input-embeddings-Embeddings"
}
],
"inputs": {
"document": ["{{pdfFile_0.data.instance}}", "{{textFile_0.data.instance}}"],
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
"pineconeEnv": "northamerica-northeast1-gcp",
"pineconeIndex": "myindex",
"pineconeNamespace": "my-namespace"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeUpsert_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeUpsert_0-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1161.8813042660154,
"y": 537.0216614326227
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 1570.3859788160953,
"y": 423.6687850109136
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
},
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". You will provide me with answers from the given info. If the answer is not included, say exactly \"Hmm, I am not sure.\" and stop after that. Refuse to answer any question not about the info. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-systemMessagePrompt-string"
},
{
"label": "Chain Option",
"name": "chainOption",
"type": "options",
"options": [
{
"label": "MapReduceDocumentsChain",
"name": "map_reduce",
"description": "Suitable for QA tasks over larger documents and can run the preprocessing step in parallel, reducing the running time"
},
{
"label": "RefineDocumentsChain",
"name": "refine",
"description": "Suitable for QA tasks over a large number of documents."
},
{
"label": "StuffDocumentsChain",
"name": "stuff",
"description": "Suitable for QA tasks over a small number of documents."
}
],
"additionalParams": true,
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-chainOption-options"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
}
],
"inputs": {
"model": "{{openAI_1.data.instance}}",
"vectorStoreRetriever": "{{pineconeUpsert_0.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1570.3859788160953,
"y": 423.6687850109136
},
"dragging": false
}
],
"edges": [
{
"source": "recursiveCharacterTextSplitter_1",
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "textFile_0",
"targetHandle": "textFile_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "recursiveCharacterTextSplitter_1",
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
"target": "pdfFile_0",
"targetHandle": "pdfFile_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-pdfFile_0-pdfFile_0-input-textSplitter-TextSplitter",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_1",
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_0-pineconeUpsert_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "pdfFile_0",
"sourceHandle": "pdfFile_0-output-pdfFile-Document",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-document-Document",
"type": "buttonedge",
"id": "pdfFile_0-pdfFile_0-output-pdfFile-Document-pineconeUpsert_0-pineconeUpsert_0-input-document-Document",
"data": {
"label": ""
}
},
{
"source": "textFile_0",
"sourceHandle": "textFile_0-output-textFile-Document",
"target": "pineconeUpsert_0",
"targetHandle": "pineconeUpsert_0-input-document-Document",
"type": "buttonedge",
"id": "textFile_0-textFile_0-output-textFile-Document-pineconeUpsert_0-pineconeUpsert_0-input-document-Document",
"data": {
"label": ""
}
},
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeUpsert_0",
"sourceHandle": "pineconeUpsert_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "pineconeUpsert_0-pineconeUpsert_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,462 @@
{
"description": "A chain that automatically picks an appropriate prompt from multiple prompts",
"nodes": [
{
"width": 300,
"height": 632,
"id": "promptRetriever_0",
"position": {
"x": 197.46642699727397,
"y": 25.945621297410923
},
"type": "customNode",
"data": {
"id": "promptRetriever_0",
"label": "Prompt Retriever",
"name": "promptRetriever",
"type": "PromptRetriever",
"baseClasses": ["PromptRetriever"],
"category": "Retrievers",
"description": "Store prompt template with name & description to be later queried by MultiPromptChain",
"inputParams": [
{
"label": "Prompt Name",
"name": "name",
"type": "string",
"placeholder": "physics-qa",
"id": "promptRetriever_0-input-name-string"
},
{
"label": "Prompt Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of what the prompt does and when it should be used",
"placeholder": "Good for answering questions about physics",
"id": "promptRetriever_0-input-description-string"
},
{
"label": "Prompt System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"placeholder": "You are a very smart physics professor. You are great at answering questions about physics in a concise and easy to understand manner. When you don't know the answer to a question you admit that you don't know.",
"id": "promptRetriever_0-input-systemMessage-string"
}
],
"inputAnchors": [],
"inputs": {
"name": "physics",
"description": "Good for answering questions about physics",
"systemMessage": "You are a very smart physics professor. You are great at answering questions about physics in a concise and easy to understand manner. When you don't know the answer to a question you admit that you don't know."
},
"outputAnchors": [
{
"id": "promptRetriever_0-output-promptRetriever-PromptRetriever",
"name": "promptRetriever",
"label": "PromptRetriever",
"type": "PromptRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 197.46642699727397,
"y": 25.945621297410923
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "multiPromptChain_0",
"position": {
"x": 1619.1305522575494,
"y": 210.28103293821243
},
"type": "customNode",
"data": {
"id": "multiPromptChain_0",
"label": "Multi Prompt Chain",
"name": "multiPromptChain",
"type": "MultiPromptChain",
"baseClasses": ["MultiPromptChain", "MultiRouteChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain automatically picks an appropriate prompt from multiple prompt templates",
"inputParams": [],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "multiPromptChain_0-input-model-BaseLanguageModel"
},
{
"label": "Prompt Retriever",
"name": "promptRetriever",
"type": "PromptRetriever",
"list": true,
"id": "multiPromptChain_0-input-promptRetriever-PromptRetriever"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"promptRetriever": [
"{{promptRetriever_0.data.instance}}",
"{{promptRetriever_2.data.instance}}",
"{{promptRetriever_1.data.instance}}"
]
},
"outputAnchors": [
{
"id": "multiPromptChain_0-output-multiPromptChain-MultiPromptChain|MultiRouteChain|BaseChain|BaseLangChain",
"name": "multiPromptChain",
"label": "MultiPromptChain",
"type": "MultiPromptChain | MultiRouteChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 1619.1305522575494,
"y": 210.28103293821243
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 632,
"id": "promptRetriever_1",
"position": {
"x": 539.1322780233141,
"y": -250.72967142925938
},
"type": "customNode",
"data": {
"id": "promptRetriever_1",
"label": "Prompt Retriever",
"name": "promptRetriever",
"type": "PromptRetriever",
"baseClasses": ["PromptRetriever"],
"category": "Retrievers",
"description": "Store prompt template with name & description to be later queried by MultiPromptChain",
"inputParams": [
{
"label": "Prompt Name",
"name": "name",
"type": "string",
"placeholder": "physics-qa",
"id": "promptRetriever_1-input-name-string"
},
{
"label": "Prompt Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of what the prompt does and when it should be used",
"placeholder": "Good for answering questions about physics",
"id": "promptRetriever_1-input-description-string"
},
{
"label": "Prompt System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"placeholder": "You are a very smart physics professor. You are great at answering questions about physics in a concise and easy to understand manner. When you don't know the answer to a question you admit that you don't know.",
"id": "promptRetriever_1-input-systemMessage-string"
}
],
"inputAnchors": [],
"inputs": {
"name": "math",
"description": "Good for answering math questions",
"systemMessage": "You are a very good mathematician. You are great at answering math questions. You are so good because you are able to break down hard problems into their component parts, answer the component parts, and then put them together to answer the broader question."
},
"outputAnchors": [
{
"id": "promptRetriever_1-output-promptRetriever-PromptRetriever",
"name": "promptRetriever",
"label": "PromptRetriever",
"type": "PromptRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 539.1322780233141,
"y": -250.72967142925938
},
"dragging": false
},
{
"width": 300,
"height": 632,
"id": "promptRetriever_2",
"position": {
"x": 872.6184534864304,
"y": -366.9443140594265
},
"type": "customNode",
"data": {
"id": "promptRetriever_2",
"label": "Prompt Retriever",
"name": "promptRetriever",
"type": "PromptRetriever",
"baseClasses": ["PromptRetriever"],
"category": "Retrievers",
"description": "Store prompt template with name & description to be later queried by MultiPromptChain",
"inputParams": [
{
"label": "Prompt Name",
"name": "name",
"type": "string",
"placeholder": "physics-qa",
"id": "promptRetriever_2-input-name-string"
},
{
"label": "Prompt Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of what the prompt does and when it should be used",
"placeholder": "Good for answering questions about physics",
"id": "promptRetriever_2-input-description-string"
},
{
"label": "Prompt System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"placeholder": "You are a very smart physics professor. You are great at answering questions about physics in a concise and easy to understand manner. When you don't know the answer to a question you admit that you don't know.",
"id": "promptRetriever_2-input-systemMessage-string"
}
],
"inputAnchors": [],
"inputs": {
"name": "history",
"description": "Good for answering questions about history",
"systemMessage": "You are a very smart history professor. You are great at answering questions about history in a concise and easy to understand manner. When you don't know the answer to a question you admit that you don't know."
},
"outputAnchors": [
{
"id": "promptRetriever_2-output-promptRetriever-PromptRetriever",
"name": "promptRetriever",
"label": "PromptRetriever",
"type": "PromptRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 872.6184534864304,
"y": -366.9443140594265
},
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 1230.07368145571,
"y": -296.44522826934826
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1230.07368145571,
"y": -296.44522826934826
},
"dragging": false
}
],
"edges": [
{
"source": "promptRetriever_0",
"sourceHandle": "promptRetriever_0-output-promptRetriever-PromptRetriever",
"target": "multiPromptChain_0",
"targetHandle": "multiPromptChain_0-input-promptRetriever-PromptRetriever",
"type": "buttonedge",
"id": "promptRetriever_0-promptRetriever_0-output-promptRetriever-PromptRetriever-multiPromptChain_0-multiPromptChain_0-input-promptRetriever-PromptRetriever",
"data": {
"label": ""
}
},
{
"source": "promptRetriever_2",
"sourceHandle": "promptRetriever_2-output-promptRetriever-PromptRetriever",
"target": "multiPromptChain_0",
"targetHandle": "multiPromptChain_0-input-promptRetriever-PromptRetriever",
"type": "buttonedge",
"id": "promptRetriever_2-promptRetriever_2-output-promptRetriever-PromptRetriever-multiPromptChain_0-multiPromptChain_0-input-promptRetriever-PromptRetriever",
"data": {
"label": ""
}
},
{
"source": "promptRetriever_1",
"sourceHandle": "promptRetriever_1-output-promptRetriever-PromptRetriever",
"target": "multiPromptChain_0",
"targetHandle": "multiPromptChain_0-input-promptRetriever-PromptRetriever",
"type": "buttonedge",
"id": "promptRetriever_1-promptRetriever_1-output-promptRetriever-PromptRetriever-multiPromptChain_0-multiPromptChain_0-input-promptRetriever-PromptRetriever",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "multiPromptChain_0",
"targetHandle": "multiPromptChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-multiPromptChain_0-multiPromptChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,925 @@
{
"description": "A chain that automatically picks an appropriate retriever from multiple different vector databases",
"nodes": [
{
"width": 300,
"height": 504,
"id": "vectorStoreRetriever_0",
"position": {
"x": 712.9322670298264,
"y": 860.5462810572917
},
"type": "customNode",
"data": {
"id": "vectorStoreRetriever_0",
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "VectorStoreRetriever",
"baseClasses": ["VectorStoreRetriever"],
"category": "Retrievers",
"description": "Store vector store as retriever. Used with MultiRetrievalQAChain",
"inputParams": [
{
"label": "Retriever Name",
"name": "name",
"type": "string",
"placeholder": "netflix movies",
"id": "vectorStoreRetriever_0-input-name-string"
},
{
"label": "Retriever Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of when to use the vector store retriever",
"placeholder": "Good for answering questions about netflix movies",
"id": "vectorStoreRetriever_0-input-description-string"
}
],
"inputAnchors": [
{
"label": "Vector Store",
"name": "vectorStore",
"type": "VectorStore",
"id": "vectorStoreRetriever_0-input-vectorStore-VectorStore"
}
],
"inputs": {
"vectorStore": "{{supabaseExistingIndex_0.data.instance}}",
"name": "aqua teen",
"description": "Good for answering questions about Aqua Teen Hunger Force theme song"
},
"outputAnchors": [
{
"id": "vectorStoreRetriever_0-output-vectorStoreRetriever-VectorStoreRetriever",
"name": "vectorStoreRetriever",
"label": "VectorStoreRetriever",
"type": "VectorStoreRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 712.9322670298264,
"y": 860.5462810572917
},
"dragging": false
},
{
"width": 300,
"height": 279,
"id": "multiRetrievalQAChain_0",
"position": {
"x": 1563.0150452201099,
"y": 460.78375893303934
},
"type": "customNode",
"data": {
"id": "multiRetrievalQAChain_0",
"label": "Multi Retrieval QA Chain",
"name": "multiRetrievalQAChain",
"type": "MultiRetrievalQAChain",
"baseClasses": ["MultiRetrievalQAChain", "MultiRouteChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "QA Chain that automatically picks an appropriate vector store from multiple retrievers",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "multiRetrievalQAChain_0-input-model-BaseLanguageModel"
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "VectorStoreRetriever",
"list": true,
"id": "multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"vectorStoreRetriever": [
"{{vectorStoreRetriever_0.data.instance}}",
"{{vectorStoreRetriever_1.data.instance}}",
"{{vectorStoreRetriever_2.data.instance}}"
]
},
"outputAnchors": [
{
"id": "multiRetrievalQAChain_0-output-multiRetrievalQAChain-MultiRetrievalQAChain|MultiRouteChain|BaseChain|BaseLangChain",
"name": "multiRetrievalQAChain",
"label": "MultiRetrievalQAChain",
"type": "MultiRetrievalQAChain | MultiRouteChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1563.0150452201099,
"y": 460.78375893303934
},
"dragging": false
},
{
"width": 300,
"height": 504,
"id": "vectorStoreRetriever_1",
"position": {
"x": 711.4902931206071,
"y": 315.2414600651632
},
"type": "customNode",
"data": {
"id": "vectorStoreRetriever_1",
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "VectorStoreRetriever",
"baseClasses": ["VectorStoreRetriever"],
"category": "Retrievers",
"description": "Store vector store as retriever. Used with MultiRetrievalQAChain",
"inputParams": [
{
"label": "Retriever Name",
"name": "name",
"type": "string",
"placeholder": "netflix movies",
"id": "vectorStoreRetriever_1-input-name-string"
},
{
"label": "Retriever Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of when to use the vector store retriever",
"placeholder": "Good for answering questions about netflix movies",
"id": "vectorStoreRetriever_1-input-description-string"
}
],
"inputAnchors": [
{
"label": "Vector Store",
"name": "vectorStore",
"type": "VectorStore",
"id": "vectorStoreRetriever_1-input-vectorStore-VectorStore"
}
],
"inputs": {
"vectorStore": "{{chromaExistingIndex_0.data.instance}}",
"name": "mst3k",
"description": "Good for answering questions about Mystery Science Theater 3000 theme song"
},
"outputAnchors": [
{
"id": "vectorStoreRetriever_1-output-vectorStoreRetriever-VectorStoreRetriever",
"name": "vectorStoreRetriever",
"label": "VectorStoreRetriever",
"type": "VectorStoreRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 711.4902931206071,
"y": 315.2414600651632
},
"dragging": false
},
{
"width": 300,
"height": 504,
"id": "vectorStoreRetriever_2",
"position": {
"x": 706.0716220151372,
"y": -217.51566869136752
},
"type": "customNode",
"data": {
"id": "vectorStoreRetriever_2",
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "VectorStoreRetriever",
"baseClasses": ["VectorStoreRetriever"],
"category": "Retrievers",
"description": "Store vector store as retriever. Used with MultiRetrievalQAChain",
"inputParams": [
{
"label": "Retriever Name",
"name": "name",
"type": "string",
"placeholder": "netflix movies",
"id": "vectorStoreRetriever_2-input-name-string"
},
{
"label": "Retriever Description",
"name": "description",
"type": "string",
"rows": 3,
"description": "Description of when to use the vector store retriever",
"placeholder": "Good for answering questions about netflix movies",
"id": "vectorStoreRetriever_2-input-description-string"
}
],
"inputAnchors": [
{
"label": "Vector Store",
"name": "vectorStore",
"type": "VectorStore",
"id": "vectorStoreRetriever_2-input-vectorStore-VectorStore"
}
],
"inputs": {
"vectorStore": "{{pineconeExistingIndex_0.data.instance}}",
"name": "animaniacs",
"description": "Good for answering questions about Animaniacs theme song"
},
"outputAnchors": [
{
"id": "vectorStoreRetriever_2-output-vectorStoreRetriever-VectorStoreRetriever",
"name": "vectorStoreRetriever",
"label": "VectorStoreRetriever",
"type": "VectorStoreRetriever"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 706.0716220151372,
"y": -217.51566869136752
},
"dragging": false
},
{
"width": 300,
"height": 523,
"id": "chatOpenAI_0",
"position": {
"x": 1206.027762600755,
"y": -212.35338654620222
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1206.027762600755,
"y": -212.35338654620222
},
"dragging": false
},
{
"width": 300,
"height": 329,
"id": "openAIEmbeddings_0",
"position": {
"x": -254.88737984323413,
"y": 279.72801937636154
},
"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",
"id": "openAIEmbeddings_0-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": -254.88737984323413,
"y": 279.72801937636154
},
"dragging": false
},
{
"width": 300,
"height": 603,
"id": "pineconeExistingIndex_0",
"position": {
"x": 271.2513182410521,
"y": -410.32709109501735
},
"type": "customNode",
"data": {
"id": "pineconeExistingIndex_0",
"label": "Pinecone Load Existing Index",
"name": "pineconeExistingIndex",
"type": "Pinecone",
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Pinecone (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Pinecone Api Key",
"name": "pineconeApiKey",
"type": "password",
"id": "pineconeExistingIndex_0-input-pineconeApiKey-password"
},
{
"label": "Pinecone Environment",
"name": "pineconeEnv",
"type": "string",
"id": "pineconeExistingIndex_0-input-pineconeEnv-string"
},
{
"label": "Pinecone Index",
"name": "pineconeIndex",
"type": "string",
"id": "pineconeExistingIndex_0-input-pineconeIndex-string"
},
{
"label": "Pinecone Namespace",
"name": "pineconeNamespace",
"type": "string",
"placeholder": "my-first-namespace",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_0-input-pineconeNamespace-string"
},
{
"label": "Pinecone Metadata Filter",
"name": "pineconeMetadataFilter",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "pineconeExistingIndex_0-input-pineconeMetadataFilter-json"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "pineconeExistingIndex_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "pineconeExistingIndex_0-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
"pineconeEnv": "",
"pineconeIndex": "",
"pineconeNamespace": "",
"pineconeMetadataFilter": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "pineconeExistingIndex_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Pinecone Retriever",
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
},
{
"id": "pineconeExistingIndex_0-output-vectorStore-Pinecone|VectorStore",
"name": "vectorStore",
"label": "Pinecone Vector Store",
"type": "Pinecone | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "vectorStore"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 271.2513182410521,
"y": -410.32709109501735
},
"dragging": false
},
{
"width": 300,
"height": 505,
"id": "chromaExistingIndex_0",
"position": {
"x": 269.2940530300552,
"y": 262.41814510537796
},
"type": "customNode",
"data": {
"id": "chromaExistingIndex_0",
"label": "Chroma Load Existing Index",
"name": "chromaExistingIndex",
"type": "Chroma",
"baseClasses": ["Chroma", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Chroma (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Collection Name",
"name": "collectionName",
"type": "string",
"id": "chromaExistingIndex_0-input-collectionName-string"
},
{
"label": "Chroma URL",
"name": "chromaURL",
"type": "string",
"optional": true,
"id": "chromaExistingIndex_0-input-chromaURL-string"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "chromaExistingIndex_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "chromaExistingIndex_0-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
"collectionName": "",
"chromaURL": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "chromaExistingIndex_0-output-retriever-Chroma|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Chroma Retriever",
"type": "Chroma | VectorStoreRetriever | BaseRetriever"
},
{
"id": "chromaExistingIndex_0-output-vectorStore-Chroma|VectorStore",
"name": "vectorStore",
"label": "Chroma Vector Store",
"type": "Chroma | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "vectorStore"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 269.2940530300552,
"y": 262.41814510537796
},
"dragging": false
},
{
"width": 300,
"height": 702,
"id": "supabaseExistingIndex_0",
"position": {
"x": 273.7097153973373,
"y": 821.872758974335
},
"type": "customNode",
"data": {
"id": "supabaseExistingIndex_0",
"label": "Supabase Load Existing Index",
"name": "supabaseExistingIndex",
"type": "Supabase",
"baseClasses": ["Supabase", "VectorStoreRetriever", "BaseRetriever"],
"category": "Vector Stores",
"description": "Load existing index from Supabase (i.e: Document has been upserted)",
"inputParams": [
{
"label": "Supabase API Key",
"name": "supabaseApiKey",
"type": "password",
"id": "supabaseExistingIndex_0-input-supabaseApiKey-password"
},
{
"label": "Supabase Project URL",
"name": "supabaseProjUrl",
"type": "string",
"id": "supabaseExistingIndex_0-input-supabaseProjUrl-string"
},
{
"label": "Table Name",
"name": "tableName",
"type": "string",
"id": "supabaseExistingIndex_0-input-tableName-string"
},
{
"label": "Query Name",
"name": "queryName",
"type": "string",
"id": "supabaseExistingIndex_0-input-queryName-string"
},
{
"label": "Supabase Metadata Filter",
"name": "supabaseMetadataFilter",
"type": "json",
"optional": true,
"additionalParams": true,
"id": "supabaseExistingIndex_0-input-supabaseMetadataFilter-json"
},
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"additionalParams": true,
"optional": true,
"id": "supabaseExistingIndex_0-input-topK-number"
}
],
"inputAnchors": [
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "supabaseExistingIndex_0-input-embeddings-Embeddings"
}
],
"inputs": {
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
"supabaseProjUrl": "",
"tableName": "",
"queryName": "",
"supabaseMetadataFilter": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "supabaseExistingIndex_0-output-retriever-Supabase|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Supabase Retriever",
"type": "Supabase | VectorStoreRetriever | BaseRetriever"
},
{
"id": "supabaseExistingIndex_0-output-vectorStore-Supabase|VectorStore",
"name": "vectorStore",
"label": "Supabase Vector Store",
"type": "Supabase | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "vectorStore"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 273.7097153973373,
"y": 821.872758974335
},
"dragging": false
}
],
"edges": [
{
"source": "vectorStoreRetriever_0",
"sourceHandle": "vectorStoreRetriever_0-output-vectorStoreRetriever-VectorStoreRetriever",
"target": "multiRetrievalQAChain_0",
"targetHandle": "multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"type": "buttonedge",
"id": "vectorStoreRetriever_0-vectorStoreRetriever_0-output-vectorStoreRetriever-VectorStoreRetriever-multiRetrievalQAChain_0-multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"data": {
"label": ""
}
},
{
"source": "vectorStoreRetriever_1",
"sourceHandle": "vectorStoreRetriever_1-output-vectorStoreRetriever-VectorStoreRetriever",
"target": "multiRetrievalQAChain_0",
"targetHandle": "multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"type": "buttonedge",
"id": "vectorStoreRetriever_1-vectorStoreRetriever_1-output-vectorStoreRetriever-VectorStoreRetriever-multiRetrievalQAChain_0-multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"data": {
"label": ""
}
},
{
"source": "vectorStoreRetriever_2",
"sourceHandle": "vectorStoreRetriever_2-output-vectorStoreRetriever-VectorStoreRetriever",
"target": "multiRetrievalQAChain_0",
"targetHandle": "multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"type": "buttonedge",
"id": "vectorStoreRetriever_2-vectorStoreRetriever_2-output-vectorStoreRetriever-VectorStoreRetriever-multiRetrievalQAChain_0-multiRetrievalQAChain_0-input-vectorStoreRetriever-VectorStoreRetriever",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "multiRetrievalQAChain_0",
"targetHandle": "multiRetrievalQAChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-multiRetrievalQAChain_0-multiRetrievalQAChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "pineconeExistingIndex_0",
"sourceHandle": "pineconeExistingIndex_0-output-vectorStore-Pinecone|VectorStore",
"target": "vectorStoreRetriever_2",
"targetHandle": "vectorStoreRetriever_2-input-vectorStore-VectorStore",
"type": "buttonedge",
"id": "pineconeExistingIndex_0-pineconeExistingIndex_0-output-vectorStore-Pinecone|VectorStore-vectorStoreRetriever_2-vectorStoreRetriever_2-input-vectorStore-VectorStore",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "pineconeExistingIndex_0",
"targetHandle": "pineconeExistingIndex_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeExistingIndex_0-pineconeExistingIndex_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "chromaExistingIndex_0",
"sourceHandle": "chromaExistingIndex_0-output-vectorStore-Chroma|VectorStore",
"target": "vectorStoreRetriever_1",
"targetHandle": "vectorStoreRetriever_1-input-vectorStore-VectorStore",
"type": "buttonedge",
"id": "chromaExistingIndex_0-chromaExistingIndex_0-output-vectorStore-Chroma|VectorStore-vectorStoreRetriever_1-vectorStoreRetriever_1-input-vectorStore-VectorStore",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "chromaExistingIndex_0",
"targetHandle": "chromaExistingIndex_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-chromaExistingIndex_0-chromaExistingIndex_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "supabaseExistingIndex_0",
"targetHandle": "supabaseExistingIndex_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-supabaseExistingIndex_0-supabaseExistingIndex_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "supabaseExistingIndex_0",
"sourceHandle": "supabaseExistingIndex_0-output-vectorStore-Supabase|VectorStore",
"target": "vectorStoreRetriever_0",
"targetHandle": "vectorStoreRetriever_0-input-vectorStore-VectorStore",
"type": "buttonedge",
"id": "supabaseExistingIndex_0-supabaseExistingIndex_0-output-vectorStore-Supabase|VectorStore-vectorStoreRetriever_0-vectorStoreRetriever_0-input-vectorStore-VectorStore",
"data": {
"label": ""
}
}
]
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,471 @@
{
"description": "An agent that uses OpenAI's Function Calling functionality to pick the tool and args to call",
"nodes": [
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 648.7470970481406,
"y": 462.3331811694268
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain", "Serializable"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-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-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0301",
"name": "gpt-3.5-turbo-0301"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo-0613",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": "",
"basepath": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain|Serializable",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain | Serializable"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 648.7470970481406,
"y": 462.3331811694268
},
"dragging": false
},
{
"width": 300,
"height": 278,
"id": "serper_0",
"position": {
"x": 486.27248799490576,
"y": 4.465900738576664
},
"type": "customNode",
"data": {
"id": "serper_0",
"label": "Serper",
"name": "serper",
"type": "Serper",
"baseClasses": ["Serper", "Tool", "StructuredTool", "BaseLangChain", "Serializable"],
"category": "Tools",
"description": "Wrapper around Serper.dev - Google Search API",
"inputParams": [
{
"label": "Serper Api Key",
"name": "apiKey",
"type": "password",
"id": "serper_0-input-apiKey-password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "serper_0-output-serper-Serper|Tool|StructuredTool|BaseLangChain|Serializable",
"name": "serper",
"label": "Serper",
"type": "Serper | Tool | StructuredTool | BaseLangChain | Serializable"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 486.27248799490576,
"y": 4.465900738576664
},
"dragging": false
},
{
"width": 300,
"height": 143,
"id": "calculator_0",
"position": {
"x": 286.4092336819905,
"y": 304.05673891709597
},
"type": "customNode",
"data": {
"id": "calculator_0",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Calculator", "Tool", "StructuredTool", "BaseLangChain", "Serializable"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable",
"name": "calculator",
"label": "Calculator",
"type": "Calculator | Tool | StructuredTool | BaseLangChain | Serializable"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 286.4092336819905,
"y": 304.05673891709597
},
"dragging": false
},
{
"width": 300,
"height": 383,
"id": "openAIFunctionAgent_0",
"position": {
"x": 1341.2259105169032,
"y": 318.35651549722945
},
"type": "customNode",
"data": {
"id": "openAIFunctionAgent_0",
"label": "OpenAI Function Agent",
"name": "openAIFunctionAgent",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain"],
"category": "Agents",
"description": "An agent that uses OpenAI's Function Calling functionality to pick the tool and args to call",
"inputParams": [
{
"label": "System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"optional": true,
"additionalParams": true,
"id": "openAIFunctionAgent_0-input-systemMessage-string"
}
],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "openAIFunctionAgent_0-input-tools-Tool"
},
{
"label": "Memory",
"name": "memory",
"type": "BaseChatMemory",
"id": "openAIFunctionAgent_0-input-memory-BaseChatMemory"
},
{
"label": "OpenAI Chat Model",
"name": "model",
"description": "Only works with gpt-3.5-turbo-0613 and gpt-4-0613. Refer <a target=\"_blank\" href=\"https://platform.openai.com/docs/guides/gpt/function-calling\">docs</a> for more info",
"type": "BaseChatModel",
"id": "openAIFunctionAgent_0-input-model-BaseChatModel"
}
],
"inputs": {
"tools": ["{{serper_0.data.instance}}", "{{calculator_0.data.instance}}", "{{customTool_0.data.instance}}"],
"memory": "{{bufferMemory_0.data.instance}}",
"model": "{{chatOpenAI_0.data.instance}}",
"systemMessage": ""
},
"outputAnchors": [
{
"id": "openAIFunctionAgent_0-output-openAIFunctionAgent-AgentExecutor|BaseChain",
"name": "openAIFunctionAgent",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1341.2259105169032,
"y": 318.35651549722945
},
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "bufferMemory_0",
"position": {
"x": 285.7750469157585,
"y": 465.1140427303788
},
"type": "customNode",
"data": {
"id": "bufferMemory_0",
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Remembers previous conversational back and forths directly",
"inputParams": [
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history",
"id": "bufferMemory_0-input-memoryKey-string"
},
{
"label": "Input Key",
"name": "inputKey",
"type": "string",
"default": "input",
"id": "bufferMemory_0-input-inputKey-string"
}
],
"inputAnchors": [],
"inputs": {
"memoryKey": "chat_history",
"inputKey": "input"
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 285.7750469157585,
"y": 465.1140427303788
},
"dragging": false
},
{
"width": 300,
"height": 277,
"id": "customTool_0",
"position": {
"x": 883.9529939431576,
"y": -32.32503903826486
},
"type": "customNode",
"data": {
"id": "customTool_0",
"label": "Custom Tool",
"name": "customTool",
"type": "CustomTool",
"baseClasses": ["CustomTool", "Tool", "StructuredTool"],
"category": "Tools",
"description": "Use custom tool you've created in Flowise within chatflow",
"inputParams": [
{
"label": "Select Tool",
"name": "selectedTool",
"type": "asyncOptions",
"loadMethod": "listTools",
"id": "customTool_0-input-selectedTool-asyncOptions"
}
],
"inputAnchors": [],
"inputs": {
"selectedTool": ""
},
"outputAnchors": [
{
"id": "customTool_0-output-customTool-CustomTool|Tool|StructuredTool",
"name": "customTool",
"label": "CustomTool",
"type": "CustomTool | Tool | StructuredTool"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 883.9529939431576,
"y": -32.32503903826486
},
"dragging": false
}
],
"edges": [
{
"source": "serper_0",
"sourceHandle": "serper_0-output-serper-Serper|Tool|StructuredTool|BaseLangChain|Serializable",
"target": "openAIFunctionAgent_0",
"targetHandle": "openAIFunctionAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "serper_0-serper_0-output-serper-Serper|Tool|StructuredTool|BaseLangChain|Serializable-openAIFunctionAgent_0-openAIFunctionAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "calculator_0",
"sourceHandle": "calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable",
"target": "openAIFunctionAgent_0",
"targetHandle": "openAIFunctionAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_0-calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable-openAIFunctionAgent_0-openAIFunctionAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain|Serializable",
"target": "openAIFunctionAgent_0",
"targetHandle": "openAIFunctionAgent_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain|Serializable-openAIFunctionAgent_0-openAIFunctionAgent_0-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_0",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "openAIFunctionAgent_0",
"targetHandle": "openAIFunctionAgent_0-input-memory-BaseChatMemory",
"type": "buttonedge",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-openAIFunctionAgent_0-openAIFunctionAgent_0-input-memory-BaseChatMemory",
"data": {
"label": ""
}
},
{
"source": "customTool_0",
"sourceHandle": "customTool_0-output-customTool-CustomTool|Tool|StructuredTool",
"target": "openAIFunctionAgent_0",
"targetHandle": "openAIFunctionAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "customTool_0-customTool_0-output-customTool-CustomTool|Tool|StructuredTool-openAIFunctionAgent_0-openAIFunctionAgent_0-input-tools-Tool",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,650 @@
{
"description": "Use output from a chain as prompt for another chain",
"nodes": [
{
"width": 300,
"height": 526,
"id": "openAI_2",
"position": {
"x": 793.6674026500068,
"y": -20.826430802683774
},
"type": "customNode",
"data": {
"id": "openAI_2",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_2-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_2-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_2-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_2-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_2-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 793.6674026500068,
"y": -20.826430802683774
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 534,
"id": "promptTemplate_2",
"position": {
"x": 796.3399644963663,
"y": 512.349657546027
},
"type": "customNode",
"data": {
"id": "promptTemplate_2",
"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": 4,
"placeholder": "What is a good name for a company that makes {product}?",
"id": "promptTemplate_2-input-template-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "promptTemplate_2-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"template": "You are an AI who performs one task based on the following objective: {objective}.\nRespond with how you would complete this task:",
"promptValues": "{\n \"objective\": \"{{question}}\"\n}"
},
"outputAnchors": [
{
"id": "promptTemplate_2-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 796.3399644963663,
"y": 512.349657546027
},
"dragging": false
},
{
"width": 300,
"height": 407,
"id": "llmChain_2",
"position": {
"x": 1225.2861408370582,
"y": 485.62403908243243
},
"type": "customNode",
"data": {
"id": "llmChain_2",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_2-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_2-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_2-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_2.data.instance}}",
"prompt": "{{promptTemplate_2.data.instance}}",
"chainName": "First Chain"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_2-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_2-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "outputPrediction"
},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 1225.2861408370582,
"y": 485.62403908243243
}
},
{
"width": 300,
"height": 534,
"id": "promptTemplate_3",
"position": {
"x": 1589.206555911206,
"y": 460.23470154201766
},
"type": "customNode",
"data": {
"id": "promptTemplate_3",
"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": 4,
"placeholder": "What is a good name for a company that makes {product}?",
"id": "promptTemplate_3-input-template-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "promptTemplate_3-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"template": "You are a task creation AI that uses the result of an execution agent to create new tasks with the following objective: {objective}.\nThe last completed task has the result: {result}.\nBased on the result, create new tasks to be completed by the AI system that do not overlap with result.\nReturn the tasks as an array.",
"promptValues": "{\n \"objective\": \"{{question}}\",\n \"result\": \"\"\n}"
},
"outputAnchors": [
{
"id": "promptTemplate_3-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1589.206555911206,
"y": 460.23470154201766
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "openAI_3",
"position": {
"x": 1225.2861408370586,
"y": -62.7856517905272
},
"type": "customNode",
"data": {
"id": "openAI_3",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_3-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_3-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_3-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_3-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_3-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 1225.2861408370586,
"y": -62.7856517905272
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 407,
"id": "llmChain_3",
"position": {
"x": 1972.2671768945252,
"y": 142.73435419451476
},
"type": "customNode",
"data": {
"id": "llmChain_3",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_3-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_3-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_3-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_3.data.instance}}",
"prompt": "{{promptTemplate_3.data.instance}}",
"chainName": "LastChain"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_3-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_3-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "llmChain"
},
"selected": false
},
"selected": false,
"dragging": false,
"positionAbsolute": {
"x": 1972.2671768945252,
"y": 142.73435419451476
}
}
],
"edges": [
{
"source": "llmChain_2",
"sourceHandle": "llmChain_2-output-outputPrediction-string",
"target": "promptTemplate_3",
"targetHandle": "promptTemplate_3-input-promptValues-string",
"type": "buttonedge",
"id": "llmChain_2-llmChain_2-output-outputPrediction-string-promptTemplate_3-promptTemplate_3-input-promptValues-string",
"data": {
"label": ""
}
},
{
"source": "openAI_2",
"sourceHandle": "openAI_2-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "llmChain_2",
"targetHandle": "llmChain_2-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_2-openAI_2-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-llmChain_2-llmChain_2-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "promptTemplate_2",
"sourceHandle": "promptTemplate_2-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_2",
"targetHandle": "llmChain_2-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_2-promptTemplate_2-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_2-llmChain_2-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
},
{
"source": "openAI_3",
"sourceHandle": "openAI_3-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "llmChain_3",
"targetHandle": "llmChain_3-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_3-openAI_3-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-llmChain_3-llmChain_3-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "promptTemplate_3",
"sourceHandle": "promptTemplate_3-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_3",
"targetHandle": "llmChain_3-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_3-promptTemplate_3-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_3-llmChain_3-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,241 @@
{
"description": "Answer questions over a SQL database",
"nodes": [
{
"width": 300,
"height": 524,
"id": "openAI_1",
"position": {
"x": 835.4668837832456,
"y": 182.4724119898708
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 835.4668837832456,
"y": 182.4724119898708
},
"dragging": false
},
{
"width": 300,
"height": 424,
"id": "sqlDatabaseChain_0",
"position": {
"x": 1255.0372022176111,
"y": 217.507437391498
},
"type": "customNode",
"data": {
"id": "sqlDatabaseChain_0",
"label": "Sql Database Chain",
"name": "sqlDatabaseChain",
"type": "SqlDatabaseChain",
"baseClasses": ["SqlDatabaseChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Answer questions over a SQL database",
"inputParams": [
{
"label": "Database",
"name": "database",
"type": "options",
"options": [
{
"label": "SQlite",
"name": "sqlite"
}
],
"default": "sqlite",
"id": "sqlDatabaseChain_0-input-database-options"
},
{
"label": "Database File Path",
"name": "dbFilePath",
"type": "string",
"placeholder": "C:/Users/chinook.db",
"id": "sqlDatabaseChain_0-input-dbFilePath-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "sqlDatabaseChain_0-input-model-BaseLanguageModel"
}
],
"inputs": {
"model": "{{openAI_1.data.instance}}",
"database": "sqlite",
"dbFilePath": ""
},
"outputAnchors": [
{
"id": "sqlDatabaseChain_0-output-sqlDatabaseChain-SqlDatabaseChain|BaseChain|BaseLangChain",
"name": "sqlDatabaseChain",
"label": "SqlDatabaseChain",
"type": "SqlDatabaseChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1255.0372022176111,
"y": 217.507437391498
},
"dragging": false
}
],
"edges": [
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "sqlDatabaseChain_0",
"targetHandle": "sqlDatabaseChain_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-sqlDatabaseChain_0-sqlDatabaseChain_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,302 @@
{
"description": "Basic example of Conversation Chain with built-in memory - works exactly like ChatGPT",
"nodes": [
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 750.6529856117049,
"y": -75.72544375812092
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 750.6529856117049,
"y": -75.72544375812092
},
"selected": false,
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "bufferMemory_0",
"position": {
"x": 753.4300788823234,
"y": 479.5336426526603
},
"type": "customNode",
"data": {
"id": "bufferMemory_0",
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Remembers previous conversational back and forths directly",
"inputParams": [
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history",
"id": "bufferMemory_0-input-memoryKey-string"
},
{
"label": "Input Key",
"name": "inputKey",
"type": "string",
"default": "input",
"id": "bufferMemory_0-input-inputKey-string"
}
],
"inputAnchors": [],
"inputs": {
"memoryKey": "chat_history",
"inputKey": "input"
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 753.4300788823234,
"y": 479.5336426526603
},
"dragging": false
},
{
"width": 300,
"height": 332,
"id": "conversationChain_0",
"position": {
"x": 1201.6630991237407,
"y": 291.86981791303066
},
"type": "customNode",
"data": {
"id": "conversationChain_0",
"label": "Conversation Chain",
"name": "conversationChain",
"type": "ConversationChain",
"baseClasses": ["ConversationChain", "LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chat models specific conversational chain with memory",
"inputParams": [
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"additionalParams": true,
"optional": true,
"placeholder": "You are a helpful assistant that write codes",
"id": "conversationChain_0-input-systemMessagePrompt-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseChatModel",
"id": "conversationChain_0-input-model-BaseChatModel"
},
{
"label": "Memory",
"name": "memory",
"type": "BaseMemory",
"id": "conversationChain_0-input-memory-BaseMemory"
}
],
"inputs": {
"model": "{{chatOpenAI_0.data.instance}}",
"memory": "{{bufferMemory_0.data.instance}}",
"systemMessagePrompt": ""
},
"outputAnchors": [
{
"id": "conversationChain_0-output-conversationChain-ConversationChain|LLMChain|BaseChain|BaseLangChain",
"name": "conversationChain",
"label": "ConversationChain",
"type": "ConversationChain | LLMChain | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1201.6630991237407,
"y": 291.86981791303066
},
"dragging": false
}
],
"edges": [
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "conversationChain_0",
"targetHandle": "conversationChain_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationChain_0-conversationChain_0-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_0",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "conversationChain_0",
"targetHandle": "conversationChain_0-input-memory-BaseMemory",
"type": "buttonedge",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationChain_0-conversationChain_0-input-memory-BaseMemory",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,323 @@
{
"description": "Basic example of stateless (no memory) LLM Chain with a Prompt Template and LLM Model",
"nodes": [
{
"width": 300,
"height": 526,
"id": "openAI_1",
"position": {
"x": 510.75932526856377,
"y": -44.80152395958956
},
"type": "customNode",
"data": {
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 510.75932526856377,
"y": -44.80152395958956
},
"dragging": false
},
{
"width": 300,
"height": 534,
"id": "promptTemplate_1",
"position": {
"x": 514.5434056794296,
"y": 507.47798128037107
},
"type": "customNode",
"data": {
"id": "promptTemplate_1",
"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": 4,
"placeholder": "What is a good name for a company that makes {product}?",
"id": "promptTemplate_1-input-template-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "promptTemplate_1-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"template": "",
"promptValues": ""
},
"outputAnchors": [
{
"id": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"name": "promptTemplate",
"label": "PromptTemplate",
"type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 514.5434056794296,
"y": 507.47798128037107
},
"dragging": false
},
{
"width": 300,
"height": 407,
"id": "llmChain_1",
"position": {
"x": 970.9254258940236,
"y": 320.56761595884564
},
"type": "customNode",
"data": {
"id": "llmChain_1",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_1-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_1-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_1-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{openAI_1.data.instance}}",
"prompt": "{{promptTemplate_1.data.instance}}",
"chainName": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_1-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_1-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "llmChain"
},
"selected": false
},
"positionAbsolute": {
"x": 970.9254258940236,
"y": 320.56761595884564
},
"selected": false,
"dragging": false
}
],
"edges": [
{
"source": "openAI_1",
"sourceHandle": "openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_1-openAI_1-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-llmChain_1-llmChain_1-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "promptTemplate_1",
"sourceHandle": "promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "promptTemplate_1-promptTemplate_1-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate-llmChain_1-llmChain_1-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,330 @@
{
"description": "Language translation using LLM Chain with a Chat Prompt Template and Chat Model",
"nodes": [
{
"width": 300,
"height": 711,
"id": "chatPromptTemplate_1",
"position": {
"x": 441.8516979620723,
"y": 636.1108860994266
},
"type": "customNode",
"data": {
"id": "chatPromptTemplate_1",
"label": "Chat Prompt Template",
"name": "chatPromptTemplate",
"type": "ChatPromptTemplate",
"baseClasses": ["ChatPromptTemplate", "BaseChatPromptTemplate", "BasePromptTemplate"],
"category": "Prompts",
"description": "Schema to represent a chat prompt",
"inputParams": [
{
"label": "System Message",
"name": "systemMessagePrompt",
"type": "string",
"rows": 4,
"placeholder": "You are a helpful assistant that translates {input_language} to {output_language}.",
"id": "chatPromptTemplate_1-input-systemMessagePrompt-string"
},
{
"label": "Human Message",
"name": "humanMessagePrompt",
"type": "string",
"rows": 4,
"placeholder": "{text}",
"id": "chatPromptTemplate_1-input-humanMessagePrompt-string"
},
{
"label": "Format Prompt Values",
"name": "promptValues",
"type": "string",
"rows": 4,
"placeholder": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}",
"optional": true,
"acceptVariable": true,
"list": true,
"id": "chatPromptTemplate_1-input-promptValues-string"
}
],
"inputAnchors": [],
"inputs": {
"systemMessagePrompt": "You are a helpful assistant that translates {input_language} to {output_language}.",
"humanMessagePrompt": "{input}",
"promptValues": "{\n \"input_language\": \"English\",\n \"output_language\": \"French\"\n}"
},
"outputAnchors": [
{
"id": "chatPromptTemplate_1-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
"name": "chatPromptTemplate",
"label": "ChatPromptTemplate",
"type": "ChatPromptTemplate | BaseChatPromptTemplate | BasePromptTemplate"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 441.8516979620723,
"y": 636.1108860994266
},
"dragging": false
},
{
"width": 300,
"height": 526,
"id": "chatOpenAI_1",
"position": {
"x": 439.5219561593599,
"y": 93.61600226758335
},
"type": "customNode",
"data": {
"id": "chatOpenAI_1",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 439.5219561593599,
"y": 93.61600226758335
},
"dragging": false
},
{
"width": 300,
"height": 407,
"id": "llmChain_1",
"position": {
"x": 865.7775572410412,
"y": 543.9211372857111
},
"type": "customNode",
"data": {
"id": "llmChain_1",
"label": "LLM Chain",
"name": "llmChain",
"type": "LLMChain",
"baseClasses": ["LLMChain", "BaseChain", "BaseLangChain"],
"category": "Chains",
"description": "Chain to run queries against LLMs",
"inputParams": [
{
"label": "Chain Name",
"name": "chainName",
"type": "string",
"placeholder": "Name Your Chain",
"optional": true,
"id": "llmChain_1-input-chainName-string"
}
],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "llmChain_1-input-model-BaseLanguageModel"
},
{
"label": "Prompt",
"name": "prompt",
"type": "BasePromptTemplate",
"id": "llmChain_1-input-prompt-BasePromptTemplate"
}
],
"inputs": {
"model": "{{chatOpenAI_1.data.instance}}",
"prompt": "{{chatPromptTemplate_1.data.instance}}",
"chainName": "Language Translation"
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"options": [
{
"id": "llmChain_1-output-llmChain-LLMChain|BaseChain|BaseLangChain",
"name": "llmChain",
"label": "LLM Chain",
"type": "LLMChain | BaseChain | BaseLangChain"
},
{
"id": "llmChain_1-output-outputPrediction-string",
"name": "outputPrediction",
"label": "Output Prediction",
"type": "string"
}
],
"default": "llmChain"
}
],
"outputs": {
"output": "llmChain"
},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 865.7775572410412,
"y": 543.9211372857111
},
"dragging": false
}
],
"edges": [
{
"source": "chatOpenAI_1",
"sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-llmChain_1-llmChain_1-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "chatPromptTemplate_1",
"sourceHandle": "chatPromptTemplate_1-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate",
"target": "llmChain_1",
"targetHandle": "llmChain_1-input-prompt-BasePromptTemplate",
"type": "buttonedge",
"id": "chatPromptTemplate_1-chatPromptTemplate_1-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate-llmChain_1-llmChain_1-input-prompt-BasePromptTemplate",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,638 @@
{
"description": "Conversational Agent with ability to visit a website and extract information",
"nodes": [
{
"width": 300,
"height": 524,
"id": "chatOpenAI_0",
"position": {
"x": 348.0817836845733,
"y": -86.56099395751443
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 348.0817836845733,
"y": -86.56099395751443
},
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "bufferMemory_0",
"position": {
"x": 15.045898260926037,
"y": 114.13407401971622
},
"type": "customNode",
"data": {
"id": "bufferMemory_0",
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Remembers previous conversational back and forths directly",
"inputParams": [
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history",
"id": "bufferMemory_0-input-memoryKey-string"
},
{
"label": "Input Key",
"name": "inputKey",
"type": "string",
"default": "input",
"id": "bufferMemory_0-input-inputKey-string"
}
],
"inputAnchors": [],
"inputs": {
"memoryKey": "chat_history",
"inputKey": "input"
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 15.045898260926037,
"y": 114.13407401971622
},
"dragging": false
},
{
"width": 300,
"height": 330,
"id": "openAIEmbeddings_0",
"position": {
"x": 693.9266260641734,
"y": 37.098856540087496
},
"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",
"id": "openAIEmbeddings_0-input-openAIApiKey-password"
},
{
"label": "Strip New Lines",
"name": "stripNewLines",
"type": "boolean",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-stripNewLines-boolean"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAIEmbeddings_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"stripNewLines": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"name": "openAIEmbeddings",
"label": "OpenAIEmbeddings",
"type": "OpenAIEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 693.9266260641734,
"y": 37.098856540087496
},
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "chatOpenAI_1",
"position": {
"x": 691.5132411896494,
"y": -533.1696369549378
},
"type": "customNode",
"data": {
"id": "chatOpenAI_1",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "chatOpenAI_1-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0613",
"name": "gpt-4-0613"
},
{
"label": "gpt-4-32k",
"name": "gpt-4-32k"
},
{
"label": "gpt-4-32k-0613",
"name": "gpt-4-32k-0613"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0613",
"name": "gpt-3.5-turbo-0613"
},
{
"label": "gpt-3.5-turbo-16k",
"name": "gpt-3.5-turbo-16k"
},
{
"label": "gpt-3.5-turbo-16k-0613",
"name": "gpt-3.5-turbo-16k-0613"
}
],
"default": "gpt-3.5-turbo",
"optional": true,
"id": "chatOpenAI_1-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true,
"id": "chatOpenAI_1-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-topP-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-presencePenalty-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatOpenAI_1-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 691.5132411896494,
"y": -533.1696369549378
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "webBrowser_0",
"position": {
"x": 1091.0866823400172,
"y": -16.43806989958216
},
"type": "customNode",
"data": {
"id": "webBrowser_0",
"label": "Web Browser",
"name": "webBrowser",
"type": "WebBrowser",
"baseClasses": ["WebBrowser", "Tool", "StructuredTool", "BaseLangChain"],
"category": "Tools",
"description": "Gives agent the ability to visit a website and extract information",
"inputParams": [],
"inputAnchors": [
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "webBrowser_0-input-model-BaseLanguageModel"
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "webBrowser_0-input-embeddings-Embeddings"
}
],
"inputs": {
"model": "{{chatOpenAI_1.data.instance}}",
"embeddings": "{{openAIEmbeddings_0.data.instance}}"
},
"outputAnchors": [
{
"id": "webBrowser_0-output-webBrowser-WebBrowser|Tool|StructuredTool|BaseLangChain",
"name": "webBrowser",
"label": "WebBrowser",
"type": "WebBrowser | Tool | StructuredTool | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1091.0866823400172,
"y": -16.43806989958216
},
"dragging": false
},
{
"width": 300,
"height": 383,
"id": "conversationalAgent_0",
"position": {
"x": 1451.6222493253506,
"y": 239.69137914100338
},
"type": "customNode",
"data": {
"id": "conversationalAgent_0",
"label": "Conversational Agent",
"name": "conversationalAgent",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain", "BaseLangChain"],
"category": "Agents",
"description": "Conversational agent for a chat model. It will utilize chat specific prompts",
"inputParams": [
{
"label": "System Message",
"name": "systemMessage",
"type": "string",
"rows": 4,
"optional": true,
"additionalParams": true,
"id": "conversationalAgent_0-input-systemMessage-string"
},
{
"label": "Human Message",
"name": "humanMessage",
"type": "string",
"rows": 4,
"optional": true,
"additionalParams": true,
"id": "conversationalAgent_0-input-humanMessage-string"
}
],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "conversationalAgent_0-input-tools-Tool"
},
{
"label": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "conversationalAgent_0-input-model-BaseLanguageModel"
},
{
"label": "Memory",
"name": "memory",
"type": "BaseChatMemory",
"id": "conversationalAgent_0-input-memory-BaseChatMemory"
}
],
"inputs": {
"tools": ["{{webBrowser_0.data.instance}}"],
"model": "{{chatOpenAI_0.data.instance}}",
"memory": "{{bufferMemory_0.data.instance}}",
"systemMessage": "",
"humanMessage": ""
},
"outputAnchors": [
{
"id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor|BaseChain|BaseLangChain",
"name": "conversationalAgent",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1451.6222493253506,
"y": 239.69137914100338
},
"dragging": false
}
],
"edges": [
{
"source": "chatOpenAI_1",
"sourceHandle": "chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "webBrowser_0",
"targetHandle": "webBrowser_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_1-chatOpenAI_1-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-webBrowser_0-webBrowser_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "openAIEmbeddings_0",
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
"target": "webBrowser_0",
"targetHandle": "webBrowser_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-webBrowser_0-webBrowser_0-input-embeddings-Embeddings",
"data": {
"label": ""
}
},
{
"source": "webBrowser_0",
"sourceHandle": "webBrowser_0-output-webBrowser-WebBrowser|Tool|StructuredTool|BaseLangChain",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "webBrowser_0-webBrowser_0-output-webBrowser-WebBrowser|Tool|StructuredTool|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationalAgent_0-conversationalAgent_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_0",
"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-BufferMemory|BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory",
"data": {
"label": ""
}
}
]
}
@@ -0,0 +1,281 @@
{
"description": "An agent that uses Zapier NLA to accesss apps and actions on Zapier's platform",
"nodes": [
{
"width": 300,
"height": 278,
"id": "zapierNLA_0",
"position": {
"x": 546.0561178227484,
"y": 83.03303671691799
},
"type": "customNode",
"data": {
"id": "zapierNLA_0",
"label": "Zapier NLA",
"name": "zapierNLA",
"type": "ZapierNLA",
"baseClasses": ["ZapierNLA", "Tool"],
"category": "Tools",
"description": "Access to apps and actions on Zapier's platform through a natural language API interface",
"inputParams": [
{
"label": "Zapier NLA Api Key",
"name": "apiKey",
"type": "password",
"id": "zapierNLA_0-input-apiKey-password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "zapierNLA_0-output-zapierNLA-ZapierNLA|Tool",
"name": "zapierNLA",
"label": "ZapierNLA",
"type": "ZapierNLA | Tool"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 546.0561178227484,
"y": 83.03303671691799
},
"dragging": false
},
{
"width": 300,
"height": 524,
"id": "openAI_0",
"position": {
"x": 547.3867724775708,
"y": 394.1919189424442
},
"type": "customNode",
"data": {
"id": "openAI_0",
"label": "OpenAI",
"name": "openAI",
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
"category": "LLMs",
"description": "Wrapper around OpenAI large language models",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password",
"id": "openAI_0-input-openAIApiKey-password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
}
],
"default": "text-davinci-003",
"optional": true,
"id": "openAI_0-input-modelName-options"
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.7,
"optional": true,
"id": "openAI_0-input-temperature-number"
},
{
"label": "Max Tokens",
"name": "maxTokens",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-maxTokens-number"
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-topP-number"
},
{
"label": "Best Of",
"name": "bestOf",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-bestOf-number"
},
{
"label": "Frequency Penalty",
"name": "frequencyPenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-frequencyPenalty-number"
},
{
"label": "Presence Penalty",
"name": "presencePenalty",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-presencePenalty-number"
},
{
"label": "Batch Size",
"name": "batchSize",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-batchSize-number"
},
{
"label": "Timeout",
"name": "timeout",
"type": "number",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-timeout-number"
},
{
"label": "BasePath",
"name": "basepath",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "openAI_0-input-basepath-string"
}
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
"bestOf": "",
"frequencyPenalty": "",
"presencePenalty": "",
"batchSize": "",
"timeout": ""
},
"outputAnchors": [
{
"id": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"name": "openAI",
"label": "OpenAI",
"type": "OpenAI | BaseLLM | BaseLanguageModel | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 547.3867724775708,
"y": 394.1919189424442
},
"dragging": false
},
{
"width": 300,
"height": 280,
"id": "mrklAgentLLM_0",
"position": {
"x": 1002.5779315680477,
"y": 329.9701389591812
},
"type": "customNode",
"data": {
"id": "mrklAgentLLM_0",
"label": "MRKL Agent for LLMs",
"name": "mrklAgentLLM",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain", "BaseLangChain"],
"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": "Language Model",
"name": "model",
"type": "BaseLanguageModel",
"id": "mrklAgentLLM_0-input-model-BaseLanguageModel"
}
],
"inputs": {
"tools": ["{{zapierNLA_0.data.instance}}"],
"model": "{{openAI_0.data.instance}}"
},
"outputAnchors": [
{
"id": "mrklAgentLLM_0-output-mrklAgentLLM-AgentExecutor|BaseChain|BaseLangChain",
"name": "mrklAgentLLM",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain | BaseLangChain"
}
],
"outputs": {},
"selected": false
},
"positionAbsolute": {
"x": 1002.5779315680477,
"y": 329.9701389591812
},
"selected": false
}
],
"edges": [
{
"source": "zapierNLA_0",
"sourceHandle": "zapierNLA_0-output-zapierNLA-ZapierNLA|Tool",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-tools-Tool",
"type": "buttonedge",
"id": "zapierNLA_0-zapierNLA_0-output-zapierNLA-ZapierNLA|Tool-mrklAgentLLM_0-mrklAgentLLM_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "openAI_0",
"sourceHandle": "openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain",
"target": "mrklAgentLLM_0",
"targetHandle": "mrklAgentLLM_0-input-model-BaseLanguageModel",
"type": "buttonedge",
"id": "openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|BaseLangChain-mrklAgentLLM_0-mrklAgentLLM_0-input-model-BaseLanguageModel",
"data": {
"label": ""
}
}
]
}