mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 01:01:11 +03:00
Merge branch 'main' into FEATURE/Vision
This commit is contained in:
@@ -21,6 +21,7 @@ PORT=3000
|
||||
# FLOWISE_USERNAME=user
|
||||
# FLOWISE_PASSWORD=1234
|
||||
# FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey
|
||||
# FLOWISE_FILE_SIZE_LIMIT=50mb
|
||||
# DEBUG=true
|
||||
# LOG_LEVEL=debug (error | warn | info | verbose | debug)
|
||||
# TOOL_FUNCTION_BUILTIN_DEP=crypto,fs
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use OpenAI Function Agent and Chain to automatically decide which API to call, generating url and body request from conversation",
|
||||
"categories": "Buffer Memory,ChainTool,API Chain,ChatOpenAI,OpenAI Function Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Given API docs, agent automatically decide which API to call, generating url and body request from conversation",
|
||||
"categories": "Buffer Memory,ChainTool,API Chain,ChatOpenAI,Conversational Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -0,0 +1,464 @@
|
||||
{
|
||||
"description": "Return response as a JSON structure as specified by a Zod schema",
|
||||
"badge": "NEW",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
"height": 508,
|
||||
"id": "llmChain_0",
|
||||
"position": {
|
||||
"x": 1229.1699649849293,
|
||||
"y": 245.55173505632646
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "llmChain_0",
|
||||
"label": "LLM Chain",
|
||||
"version": 3,
|
||||
"name": "llmChain",
|
||||
"type": "LLMChain",
|
||||
"baseClasses": ["LLMChain", "BaseChain", "Runnable"],
|
||||
"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_0-input-chainName-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Language Model",
|
||||
"name": "model",
|
||||
"type": "BaseLanguageModel",
|
||||
"id": "llmChain_0-input-model-BaseLanguageModel"
|
||||
},
|
||||
{
|
||||
"label": "Prompt",
|
||||
"name": "prompt",
|
||||
"type": "BasePromptTemplate",
|
||||
"id": "llmChain_0-input-prompt-BasePromptTemplate"
|
||||
},
|
||||
{
|
||||
"label": "Output Parser",
|
||||
"name": "outputParser",
|
||||
"type": "BaseLLMOutputParser",
|
||||
"optional": true,
|
||||
"id": "llmChain_0-input-outputParser-BaseLLMOutputParser"
|
||||
},
|
||||
{
|
||||
"label": "Input Moderation",
|
||||
"description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
|
||||
"name": "inputModeration",
|
||||
"type": "Moderation",
|
||||
"optional": true,
|
||||
"list": true,
|
||||
"id": "llmChain_0-input-inputModeration-Moderation"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"model": "{{chatOpenAI_0.data.instance}}",
|
||||
"prompt": "{{chatPromptTemplate_0.data.instance}}",
|
||||
"outputParser": "{{advancedStructuredOutputParser_0.data.instance}}",
|
||||
"chainName": "",
|
||||
"inputModeration": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable",
|
||||
"name": "llmChain",
|
||||
"label": "LLM Chain",
|
||||
"type": "LLMChain | BaseChain | Runnable"
|
||||
},
|
||||
{
|
||||
"id": "llmChain_0-output-outputPrediction-string|json",
|
||||
"name": "outputPrediction",
|
||||
"label": "Output Prediction",
|
||||
"type": "string | json"
|
||||
}
|
||||
],
|
||||
"default": "llmChain"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "llmChain"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 1229.1699649849293,
|
||||
"y": 245.55173505632646
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 690,
|
||||
"id": "chatPromptTemplate_0",
|
||||
"position": {
|
||||
"x": 493.26582927222483,
|
||||
"y": -156.20470841335592
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatPromptTemplate_0",
|
||||
"label": "Chat Prompt Template",
|
||||
"version": 1,
|
||||
"name": "chatPromptTemplate",
|
||||
"type": "ChatPromptTemplate",
|
||||
"baseClasses": ["ChatPromptTemplate", "BaseChatPromptTemplate", "BasePromptTemplate", "Runnable"],
|
||||
"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_0-input-systemMessagePrompt-string"
|
||||
},
|
||||
{
|
||||
"label": "Human Message",
|
||||
"name": "humanMessagePrompt",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"placeholder": "{text}",
|
||||
"id": "chatPromptTemplate_0-input-humanMessagePrompt-string"
|
||||
},
|
||||
{
|
||||
"label": "Format Prompt Values",
|
||||
"name": "promptValues",
|
||||
"type": "json",
|
||||
"optional": true,
|
||||
"acceptVariable": true,
|
||||
"list": true,
|
||||
"id": "chatPromptTemplate_0-input-promptValues-json"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"systemMessagePrompt": "This AI is designed to only output information in JSON format without exception. This AI can only output JSON and will never output any other text.\n\nWhen asked to correct itself, this AI will only output the corrected JSON and never any other text.",
|
||||
"humanMessagePrompt": "{text}",
|
||||
"promptValues": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable",
|
||||
"name": "chatPromptTemplate",
|
||||
"label": "ChatPromptTemplate",
|
||||
"type": "ChatPromptTemplate | BaseChatPromptTemplate | BasePromptTemplate | Runnable"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 493.26582927222483,
|
||||
"y": -156.20470841335592
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 576,
|
||||
"id": "chatOpenAI_0",
|
||||
"position": {
|
||||
"x": 860.555928011636,
|
||||
"y": -355.71028569475095
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 3,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
"category": "Chat Models",
|
||||
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["openAIApi"],
|
||||
"id": "chatOpenAI_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-turbo-preview",
|
||||
"name": "gpt-4-turbo-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0125-preview",
|
||||
"name": "gpt-4-0125-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-1106-preview",
|
||||
"name": "gpt-4-1106-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-vision-preview",
|
||||
"name": "gpt-4-vision-preview"
|
||||
},
|
||||
{
|
||||
"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-0125",
|
||||
"name": "gpt-3.5-turbo-0125"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-1106",
|
||||
"name": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokens",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-maxTokens-number"
|
||||
},
|
||||
{
|
||||
"label": "Top Probability",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Frequency Penalty",
|
||||
"name": "frequencyPenalty",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-frequencyPenalty-number"
|
||||
},
|
||||
{
|
||||
"label": "Presence Penalty",
|
||||
"name": "presencePenalty",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-presencePenalty-number"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"label": "BaseOptions",
|
||||
"name": "baseOptions",
|
||||
"type": "json",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Cache",
|
||||
"name": "cache",
|
||||
"type": "BaseCache",
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-cache-BaseCache"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"cache": "",
|
||||
"modelName": "",
|
||||
"temperature": "0",
|
||||
"maxTokens": "",
|
||||
"topP": "",
|
||||
"frequencyPenalty": "",
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
||||
"name": "chatOpenAI",
|
||||
"label": "ChatOpenAI",
|
||||
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | Runnable"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 860.555928011636,
|
||||
"y": -355.71028569475095
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 454,
|
||||
"id": "advancedStructuredOutputParser_0",
|
||||
"position": {
|
||||
"x": 489.3637511211284,
|
||||
"y": 580.0628053662244
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "advancedStructuredOutputParser_0",
|
||||
"label": "Advanced Structured Output Parser",
|
||||
"version": 1,
|
||||
"name": "advancedStructuredOutputParser",
|
||||
"type": "AdvancedStructuredOutputParser",
|
||||
"baseClasses": ["AdvancedStructuredOutputParser", "BaseLLMOutputParser", "Runnable"],
|
||||
"category": "Output Parsers",
|
||||
"description": "Parse the output of an LLM call into a given structure by providing a Zod schema.",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Autofix",
|
||||
"name": "autofixParser",
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "In the event that the first call fails, will make another call to the model to fix any errors.",
|
||||
"id": "advancedStructuredOutputParser_0-input-autofixParser-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Example JSON",
|
||||
"name": "exampleJson",
|
||||
"type": "string",
|
||||
"description": "Zod schema for the output of the model",
|
||||
"rows": 10,
|
||||
"default": "z.object({\n title: z.string(), // Title of the movie as a string\n yearOfRelease: z.number().int(), // Release year as an integer number,\n genres: z.enum([\n \"Action\", \"Comedy\", \"Drama\", \"Fantasy\", \"Horror\",\n \"Mystery\", \"Romance\", \"Science Fiction\", \"Thriller\", \"Documentary\"\n ]).array().max(2), // Array of genres, max of 2 from the defined enum\n shortDescription: z.string().max(500) // Short description, max 500 characters\n})",
|
||||
"id": "advancedStructuredOutputParser_0-input-exampleJson-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"autofixParser": "",
|
||||
"exampleJson": "z.object({\n title: z.string(), // Title of the movie as a string\n yearOfRelease: z.number().int(), // Release year as an integer number,\n genres: z.enum([\n \"Action\", \"Comedy\", \"Drama\", \"Fantasy\", \"Horror\",\n \"Mystery\", \"Romance\", \"Science Fiction\", \"Thriller\", \"Documentary\"\n ]).array().max(2), // Array of genres, max of 2 from the defined enum\n shortDescription: z.string().max(500) // Short description, max 500 characters\n})"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "advancedStructuredOutputParser_0-output-advancedStructuredOutputParser-AdvancedStructuredOutputParser|BaseLLMOutputParser|Runnable",
|
||||
"name": "advancedStructuredOutputParser",
|
||||
"label": "AdvancedStructuredOutputParser",
|
||||
"type": "AdvancedStructuredOutputParser | BaseLLMOutputParser | Runnable"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"dragging": false,
|
||||
"positionAbsolute": {
|
||||
"x": 489.3637511211284,
|
||||
"y": 580.0628053662244
|
||||
}
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "chatPromptTemplate_0",
|
||||
"sourceHandle": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable",
|
||||
"target": "llmChain_0",
|
||||
"targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
|
||||
"type": "buttonedge",
|
||||
"id": "chatPromptTemplate_0-chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "chatOpenAI_0",
|
||||
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
||||
"target": "llmChain_0",
|
||||
"targetHandle": "llmChain_0-input-model-BaseLanguageModel",
|
||||
"type": "buttonedge",
|
||||
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-llmChain_0-llmChain_0-input-model-BaseLanguageModel"
|
||||
},
|
||||
{
|
||||
"source": "advancedStructuredOutputParser_0",
|
||||
"sourceHandle": "advancedStructuredOutputParser_0-output-advancedStructuredOutputParser-AdvancedStructuredOutputParser|BaseLLMOutputParser|Runnable",
|
||||
"target": "llmChain_0",
|
||||
"targetHandle": "llmChain_0-input-outputParser-BaseLLMOutputParser",
|
||||
"type": "buttonedge",
|
||||
"id": "advancedStructuredOutputParser_0-advancedStructuredOutputParser_0-output-advancedStructuredOutputParser-AdvancedStructuredOutputParser|BaseLLMOutputParser|Runnable-llmChain_0-llmChain_0-input-outputParser-BaseLLMOutputParser"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Output antonym of given user input using few-shot prompt template built with examples",
|
||||
"categories": "Few Shot Prompt,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use AutoGPT - Autonomous agent with chain of thoughts for self-guided task completion",
|
||||
"categories": "AutoGPT,SERP Tool,File Read/Write,ChatOpenAI,Pinecone,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use BabyAGI to create tasks and reprioritize for a given objective",
|
||||
"categories": "BabyAGI,ChatOpenAI,Pinecone,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Analyse and summarize CSV data",
|
||||
"categories": "CSV Agent,ChatOpenAI,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Engage with data sources such as YouTube Transcripts, Google, and more through intelligent Q&A interactions",
|
||||
"categories": "Memory Vector Store,SearchAPI,ChatOpenAI,Conversational Retrieval QA Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use ChatGPT Plugins within LangChain abstractions with GET and POST Tools",
|
||||
"categories": "ChatGPT Plugin,HTTP GET/POST,ChatOpenAI,MRKL Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use Anthropic Claude with 200k context window to ingest whole document for QnA",
|
||||
"categories": "Buffer Memory,Prompt Template,Conversation Chain,ChatAnthropic,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
@@ -439,10 +441,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "plainText_0-output-document-Document",
|
||||
"id": "plainText_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "plainText_0-output-text-string|json",
|
||||
|
||||
@@ -0,0 +1,919 @@
|
||||
{
|
||||
"description": "Answer question based on retrieved documents (context) with built-in memory to remember conversation using LlamaIndex",
|
||||
"categories": "Text File,Prompt Template,ChatOpenAI,Conversation Chain,Pinecone,LlamaIndex,Redis",
|
||||
"framework": "LlamaIndex",
|
||||
"badge": "NEW",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
"height": 438,
|
||||
"id": "textFile_0",
|
||||
"position": {
|
||||
"x": 221.215421786192,
|
||||
"y": 94.91489477412404
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "textFile_0",
|
||||
"label": "Text File",
|
||||
"version": 3,
|
||||
"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, .html, .aspx, .asp, .cpp, .c, .cs, .css, .go, .h, .java, .js, .less, .ts, .php, .proto, .python, .py, .rst, .ruby, .rb, .rs, .scala, .sc, .scss, .sol, .sql, .swift, .markdown, .md, .tex, .ltx, .vb, .xml",
|
||||
"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_0.data.instance}}",
|
||||
"metadata": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "textFile_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "textFile_0-output-text-string|json",
|
||||
"name": "text",
|
||||
"label": "Text",
|
||||
"type": "string | json"
|
||||
}
|
||||
],
|
||||
"default": "document"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "document"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 221.215421786192,
|
||||
"y": 94.91489477412404
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 429,
|
||||
"id": "recursiveCharacterTextSplitter_0",
|
||||
"position": {
|
||||
"x": -203.4868320229876,
|
||||
"y": 101.32475976329766
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "recursiveCharacterTextSplitter_0",
|
||||
"label": "Recursive Character Text Splitter",
|
||||
"version": 2,
|
||||
"name": "recursiveCharacterTextSplitter",
|
||||
"type": "RecursiveCharacterTextSplitter",
|
||||
"baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter", "BaseDocumentTransformer", "Runnable"],
|
||||
"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_0-input-chunkSize-number"
|
||||
},
|
||||
{
|
||||
"label": "Chunk Overlap",
|
||||
"name": "chunkOverlap",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"id": "recursiveCharacterTextSplitter_0-input-chunkOverlap-number"
|
||||
},
|
||||
{
|
||||
"label": "Custom Separators",
|
||||
"name": "separators",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"description": "Array of custom separators to determine when to split the text, will override the default separators",
|
||||
"placeholder": "[\"|\", \"##\", \">\", \"-\"]",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "recursiveCharacterTextSplitter_0-input-separators-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"chunkSize": 1000,
|
||||
"chunkOverlap": "",
|
||||
"separators": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
|
||||
"name": "recursiveCharacterTextSplitter",
|
||||
"label": "RecursiveCharacterTextSplitter",
|
||||
"type": "RecursiveCharacterTextSplitter | TextSplitter | BaseDocumentTransformer | Runnable"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": -203.4868320229876,
|
||||
"y": 101.32475976329766
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 334,
|
||||
"id": "openAIEmbedding_LlamaIndex_0",
|
||||
"position": {
|
||||
"x": 176.27434578083106,
|
||||
"y": 953.3664298122493
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "openAIEmbedding_LlamaIndex_0",
|
||||
"label": "OpenAI Embedding",
|
||||
"version": 1,
|
||||
"name": "openAIEmbedding_LlamaIndex",
|
||||
"type": "OpenAIEmbedding",
|
||||
"baseClasses": ["OpenAIEmbedding", "BaseEmbedding_LlamaIndex", "BaseEmbedding"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Embeddings",
|
||||
"description": "OpenAI Embedding specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["openAIApi"],
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"name": "text-embedding-3-large"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"name": "text-embedding-3-small"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"name": "text-embedding-ada-002"
|
||||
}
|
||||
],
|
||||
"default": "text-embedding-ada-002",
|
||||
"optional": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-timeout-number"
|
||||
},
|
||||
{
|
||||
"label": "BasePath",
|
||||
"name": "basepath",
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-basepath-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"timeout": "",
|
||||
"basepath": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding",
|
||||
"name": "openAIEmbedding_LlamaIndex",
|
||||
"label": "OpenAIEmbedding",
|
||||
"type": "OpenAIEmbedding | BaseEmbedding_LlamaIndex | BaseEmbedding"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 176.27434578083106,
|
||||
"y": 953.3664298122493
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 585,
|
||||
"id": "pineconeLlamaIndex_0",
|
||||
"position": {
|
||||
"x": 609.3087433345761,
|
||||
"y": 488.2141798951578
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "pineconeLlamaIndex_0",
|
||||
"label": "Pinecone",
|
||||
"version": 1,
|
||||
"name": "pineconeLlamaIndex",
|
||||
"type": "Pinecone",
|
||||
"baseClasses": ["Pinecone", "VectorIndexRetriever"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Vector Stores",
|
||||
"description": "Upsert embedded data and perform similarity search upon query using Pinecone, a leading fully managed hosted vector database",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["pineconeApi"],
|
||||
"id": "pineconeLlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Index",
|
||||
"name": "pineconeIndex",
|
||||
"type": "string",
|
||||
"id": "pineconeLlamaIndex_0-input-pineconeIndex-string"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Namespace",
|
||||
"name": "pineconeNamespace",
|
||||
"type": "string",
|
||||
"placeholder": "my-first-namespace",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "pineconeLlamaIndex_0-input-pineconeNamespace-string"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Metadata Filter",
|
||||
"name": "pineconeMetadataFilter",
|
||||
"type": "json",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "pineconeLlamaIndex_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": "pineconeLlamaIndex_0-input-topK-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Document",
|
||||
"name": "document",
|
||||
"type": "Document",
|
||||
"list": true,
|
||||
"optional": true,
|
||||
"id": "pineconeLlamaIndex_0-input-document-Document"
|
||||
},
|
||||
{
|
||||
"label": "Chat Model",
|
||||
"name": "model",
|
||||
"type": "BaseChatModel_LlamaIndex",
|
||||
"id": "pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex"
|
||||
},
|
||||
{
|
||||
"label": "Embeddings",
|
||||
"name": "embeddings",
|
||||
"type": "BaseEmbedding_LlamaIndex",
|
||||
"id": "pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"document": ["{{textFile_0.data.instance}}"],
|
||||
"model": "{{chatOpenAI_LlamaIndex_1.data.instance}}",
|
||||
"embeddings": "{{openAIEmbedding_LlamaIndex_0.data.instance}}",
|
||||
"pineconeIndex": "",
|
||||
"pineconeNamespace": "",
|
||||
"pineconeMetadataFilter": "",
|
||||
"topK": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "pineconeLlamaIndex_0-output-retriever-Pinecone|VectorIndexRetriever",
|
||||
"name": "retriever",
|
||||
"label": "Pinecone Retriever",
|
||||
"type": "Pinecone | VectorIndexRetriever"
|
||||
},
|
||||
{
|
||||
"id": "pineconeLlamaIndex_0-output-retriever-Pinecone|VectorStoreIndex",
|
||||
"name": "vectorStore",
|
||||
"label": "Pinecone Vector Store Index",
|
||||
"type": "Pinecone | VectorStoreIndex"
|
||||
}
|
||||
],
|
||||
"default": "retriever"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "retriever"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 609.3087433345761,
|
||||
"y": 488.2141798951578
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 529,
|
||||
"id": "chatOpenAI_LlamaIndex_1",
|
||||
"position": {
|
||||
"x": -195.15244974578656,
|
||||
"y": 584.9467028201428
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatOpenAI_LlamaIndex_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 1,
|
||||
"name": "chatOpenAI_LlamaIndex",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel_LlamaIndex"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Chat Models",
|
||||
"description": "Wrapper around OpenAI Chat LLM specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["openAIApi"],
|
||||
"id": "chatOpenAI_LlamaIndex_1-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-turbo-preview",
|
||||
"name": "gpt-4-turbo-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0125-preview",
|
||||
"name": "gpt-4-0125-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-1106-preview",
|
||||
"name": "gpt-4-1106-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-vision-preview",
|
||||
"name": "gpt-4-vision-preview"
|
||||
},
|
||||
{
|
||||
"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-1106",
|
||||
"name": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
{
|
||||
"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_LlamaIndex_1-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_LlamaIndex_1-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokens",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_1-input-maxTokens-number"
|
||||
},
|
||||
{
|
||||
"label": "Top Probability",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_1-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_1-input-timeout-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"modelName": "gpt-3.5-turbo-16k",
|
||||
"temperature": 0.9,
|
||||
"maxTokens": "",
|
||||
"topP": "",
|
||||
"timeout": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatOpenAI_LlamaIndex_1-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"name": "chatOpenAI_LlamaIndex",
|
||||
"label": "ChatOpenAI",
|
||||
"type": "ChatOpenAI | BaseChatModel_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": -195.15244974578656,
|
||||
"y": 584.9467028201428
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 513,
|
||||
"id": "contextChatEngine_0",
|
||||
"position": {
|
||||
"x": 1550.2553933740128,
|
||||
"y": 270.7914631777829
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "contextChatEngine_0",
|
||||
"label": "Context Chat Engine",
|
||||
"version": 1,
|
||||
"name": "contextChatEngine",
|
||||
"type": "ContextChatEngine",
|
||||
"baseClasses": ["ContextChatEngine"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Engine",
|
||||
"description": "Answer question based on retrieved documents (context) with built-in memory to remember conversation",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Return Source Documents",
|
||||
"name": "returnSourceDocuments",
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"id": "contextChatEngine_0-input-returnSourceDocuments-boolean"
|
||||
},
|
||||
{
|
||||
"label": "System Message",
|
||||
"name": "systemMessagePrompt",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"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": "contextChatEngine_0-input-systemMessagePrompt-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Chat Model",
|
||||
"name": "model",
|
||||
"type": "BaseChatModel_LlamaIndex",
|
||||
"id": "contextChatEngine_0-input-model-BaseChatModel_LlamaIndex"
|
||||
},
|
||||
{
|
||||
"label": "Vector Store Retriever",
|
||||
"name": "vectorStoreRetriever",
|
||||
"type": "VectorIndexRetriever",
|
||||
"id": "contextChatEngine_0-input-vectorStoreRetriever-VectorIndexRetriever"
|
||||
},
|
||||
{
|
||||
"label": "Memory",
|
||||
"name": "memory",
|
||||
"type": "BaseChatMemory",
|
||||
"id": "contextChatEngine_0-input-memory-BaseChatMemory"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"model": "{{chatOpenAI_LlamaIndex_2.data.instance}}",
|
||||
"vectorStoreRetriever": "{{pineconeLlamaIndex_0.data.instance}}",
|
||||
"memory": "{{RedisBackedChatMemory_0.data.instance}}",
|
||||
"systemMessagePrompt": "",
|
||||
"returnSourceDocuments": true
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "contextChatEngine_0-output-contextChatEngine-ContextChatEngine",
|
||||
"name": "contextChatEngine",
|
||||
"label": "ContextChatEngine",
|
||||
"type": "ContextChatEngine"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1550.2553933740128,
|
||||
"y": 270.7914631777829
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 329,
|
||||
"id": "RedisBackedChatMemory_0",
|
||||
"position": {
|
||||
"x": 1081.252815805786,
|
||||
"y": 990.1701092562037
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "RedisBackedChatMemory_0",
|
||||
"label": "Redis-Backed Chat Memory",
|
||||
"version": 2,
|
||||
"name": "RedisBackedChatMemory",
|
||||
"type": "RedisBackedChatMemory",
|
||||
"baseClasses": ["RedisBackedChatMemory", "BaseChatMemory", "BaseMemory"],
|
||||
"category": "Memory",
|
||||
"description": "Summarizes the conversation and stores the memory in Redis server",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"optional": true,
|
||||
"credentialNames": ["redisCacheApi", "redisCacheUrlApi"],
|
||||
"id": "RedisBackedChatMemory_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Session Id",
|
||||
"name": "sessionId",
|
||||
"type": "string",
|
||||
"description": "If not specified, a random id will be used. Learn <a target=\"_blank\" href=\"https://docs.flowiseai.com/memory/long-term-memory#ui-and-embedded-chat\">more</a>",
|
||||
"default": "",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "RedisBackedChatMemory_0-input-sessionId-string"
|
||||
},
|
||||
{
|
||||
"label": "Session Timeouts",
|
||||
"name": "sessionTTL",
|
||||
"type": "number",
|
||||
"description": "Omit this parameter to make sessions never expire",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "RedisBackedChatMemory_0-input-sessionTTL-number"
|
||||
},
|
||||
{
|
||||
"label": "Memory Key",
|
||||
"name": "memoryKey",
|
||||
"type": "string",
|
||||
"default": "chat_history",
|
||||
"additionalParams": true,
|
||||
"id": "RedisBackedChatMemory_0-input-memoryKey-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"sessionId": "",
|
||||
"sessionTTL": "",
|
||||
"memoryKey": "chat_history"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "RedisBackedChatMemory_0-output-RedisBackedChatMemory-RedisBackedChatMemory|BaseChatMemory|BaseMemory",
|
||||
"name": "RedisBackedChatMemory",
|
||||
"label": "RedisBackedChatMemory",
|
||||
"type": "RedisBackedChatMemory | BaseChatMemory | BaseMemory"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"dragging": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1081.252815805786,
|
||||
"y": 990.1701092562037
|
||||
}
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 529,
|
||||
"id": "chatOpenAI_LlamaIndex_2",
|
||||
"position": {
|
||||
"x": 1015.1605888108386,
|
||||
"y": -38.31143117572401
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatOpenAI_LlamaIndex_2",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 1,
|
||||
"name": "chatOpenAI_LlamaIndex",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel_LlamaIndex"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Chat Models",
|
||||
"description": "Wrapper around OpenAI Chat LLM specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["openAIApi"],
|
||||
"id": "chatOpenAI_LlamaIndex_2-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-turbo-preview",
|
||||
"name": "gpt-4-turbo-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0125-preview",
|
||||
"name": "gpt-4-0125-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-1106-preview",
|
||||
"name": "gpt-4-1106-preview"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-vision-preview",
|
||||
"name": "gpt-4-vision-preview"
|
||||
},
|
||||
{
|
||||
"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-1106",
|
||||
"name": "gpt-3.5-turbo-1106"
|
||||
},
|
||||
{
|
||||
"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_LlamaIndex_2-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_LlamaIndex_2-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokens",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_2-input-maxTokens-number"
|
||||
},
|
||||
{
|
||||
"label": "Top Probability",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_2-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_LlamaIndex_2-input-timeout-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"modelName": "gpt-3.5-turbo",
|
||||
"temperature": 0.9,
|
||||
"maxTokens": "",
|
||||
"topP": "",
|
||||
"timeout": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatOpenAI_LlamaIndex_2-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"name": "chatOpenAI_LlamaIndex",
|
||||
"label": "ChatOpenAI",
|
||||
"type": "ChatOpenAI | BaseChatModel_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1015.1605888108386,
|
||||
"y": -38.31143117572401
|
||||
},
|
||||
"dragging": false
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "recursiveCharacterTextSplitter_0",
|
||||
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
|
||||
"target": "textFile_0",
|
||||
"targetHandle": "textFile_0-input-textSplitter-TextSplitter",
|
||||
"type": "buttonedge",
|
||||
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-textFile_0-textFile_0-input-textSplitter-TextSplitter",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-document-Document|json",
|
||||
"target": "pineconeLlamaIndex_0",
|
||||
"targetHandle": "pineconeLlamaIndex_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-document-Document|json-pineconeLlamaIndex_0-pineconeLlamaIndex_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "chatOpenAI_LlamaIndex_1",
|
||||
"sourceHandle": "chatOpenAI_LlamaIndex_1-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"target": "pineconeLlamaIndex_0",
|
||||
"targetHandle": "pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "chatOpenAI_LlamaIndex_1-chatOpenAI_LlamaIndex_1-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex-pineconeLlamaIndex_0-pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "openAIEmbedding_LlamaIndex_0",
|
||||
"sourceHandle": "openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding",
|
||||
"target": "pineconeLlamaIndex_0",
|
||||
"targetHandle": "pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "openAIEmbedding_LlamaIndex_0-openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding-pineconeLlamaIndex_0-pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "pineconeLlamaIndex_0",
|
||||
"sourceHandle": "pineconeLlamaIndex_0-output-pineconeLlamaIndex-Pinecone|VectorIndexRetriever",
|
||||
"target": "contextChatEngine_0",
|
||||
"targetHandle": "contextChatEngine_0-input-vectorStoreRetriever-VectorIndexRetriever",
|
||||
"type": "buttonedge",
|
||||
"id": "pineconeLlamaIndex_0-pineconeLlamaIndex_0-output-pineconeLlamaIndex-Pinecone|VectorIndexRetriever-contextChatEngine_0-contextChatEngine_0-input-vectorStoreRetriever-VectorIndexRetriever",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "RedisBackedChatMemory_0",
|
||||
"sourceHandle": "RedisBackedChatMemory_0-output-RedisBackedChatMemory-RedisBackedChatMemory|BaseChatMemory|BaseMemory",
|
||||
"target": "contextChatEngine_0",
|
||||
"targetHandle": "contextChatEngine_0-input-memory-BaseChatMemory",
|
||||
"type": "buttonedge",
|
||||
"id": "RedisBackedChatMemory_0-RedisBackedChatMemory_0-output-RedisBackedChatMemory-RedisBackedChatMemory|BaseChatMemory|BaseMemory-contextChatEngine_0-contextChatEngine_0-input-memory-BaseChatMemory",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "chatOpenAI_LlamaIndex_2",
|
||||
"sourceHandle": "chatOpenAI_LlamaIndex_2-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"target": "contextChatEngine_0",
|
||||
"targetHandle": "contextChatEngine_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "chatOpenAI_LlamaIndex_2-chatOpenAI_LlamaIndex_2-output-chatOpenAI_LlamaIndex-ChatOpenAI|BaseChatModel_LlamaIndex-contextChatEngine_0-contextChatEngine_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "A conversational agent for a chat model which utilize chat specific prompts",
|
||||
"categories": "Calculator Tool,Buffer Memory,SerpAPI,ChatOpenAI,Conversational Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Agent optimized for vector retrieval during conversation and answering questions based on previous dialogue.",
|
||||
"categories": "Retriever Tool,Buffer Memory,ChatOpenAI,Conversational Retrieval Agent, Pinecone,Langchain",
|
||||
"badge": "POPULAR",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Text file QnA using conversational retrieval QA chain",
|
||||
"categories": "TextFile,ChatOpenAI,Conversational Retrieval QA Chain,Pinecone,Langchain",
|
||||
"badge": "POPULAR",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
@@ -233,10 +235,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "textFile_0-output-document-Document",
|
||||
"id": "textFile_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "textFile_0-output-text-string|json",
|
||||
@@ -730,11 +732,11 @@
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-document-Document",
|
||||
"sourceHandle": "textFile_0-output-document-Document|json",
|
||||
"target": "pinecone_0",
|
||||
"targetHandle": "pinecone_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-document-Document-pinecone_0-pinecone_0-input-document-Document",
|
||||
"id": "textFile_0-textFile_0-output-document-Document|json-pinecone_0-pinecone_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Flowise Docs Github QnA using conversational retrieval QA chain",
|
||||
"categories": "Memory Vector Store,Github Loader,ChatOpenAI,Conversational Retrieval QA Chain,Langchain",
|
||||
"badge": "POPULAR",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Simple LLM Chain using HuggingFace Inference API on falcon-7b-instruct model",
|
||||
"categories": "HuggingFace,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Split flows based on if else condition",
|
||||
"categories": "IfElse Function,ChatOpenAI,OpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "new",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Generate image using Replicate Stability text-to-image generative AI model",
|
||||
"badge": "NEW",
|
||||
"categories": "Replicate,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
|
||||
"badge": "NEW",
|
||||
"categories": "Moderation,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Return response as a list (array) instead of a string/text",
|
||||
"badge": "NEW",
|
||||
"categories": "CSV Output Parser,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "QnA chain using Ollama local LLM, LocalAI embedding model, and Faiss local vector store",
|
||||
"badge": "POPULAR",
|
||||
"categories": "Text File,ChatOllama,Conversational Retrieval QA Chain,Faiss,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
@@ -224,10 +226,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "textFile_0-output-document-Document",
|
||||
"id": "textFile_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "textFile_0-output-text-string|json",
|
||||
@@ -649,11 +651,11 @@
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-document-Document",
|
||||
"sourceHandle": "textFile_0-output-document-Document|json",
|
||||
"target": "faiss_0",
|
||||
"targetHandle": "faiss_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-document-Document-faiss_0-faiss_0-input-document-Document",
|
||||
"id": "textFile_0-textFile_0-output-document-Document|json-faiss_0-faiss_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use long term memory like Zep to differentiate conversations between users with sessionId",
|
||||
"categories": "ChatOpenAI,Conversational Retrieval QA Chain,Zep Memory,Qdrant,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Upsert multiple files with metadata and filter by it using conversational retrieval QA chain",
|
||||
"categories": "Text File,PDF File,ChatOpenAI,Conversational Retrieval QA Chain,Pinecone,Langchain",
|
||||
"badge": "POPULAR",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
@@ -126,10 +128,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "textFile_0-output-document-Document",
|
||||
"id": "textFile_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "textFile_0-output-text-string|json",
|
||||
@@ -836,11 +838,11 @@
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-document-Document",
|
||||
"sourceHandle": "textFile_0-output-document-Document|json",
|
||||
"target": "pinecone_0",
|
||||
"targetHandle": "pinecone_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-document-Document-pinecone_0-pinecone_0-input-document-Document",
|
||||
"id": "textFile_0-textFile_0-output-document-Document|json-pinecone_0-pinecone_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "A chain that automatically picks an appropriate prompt from multiple prompts",
|
||||
"categories": "ChatOpenAI,Multi Prompt Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "A chain that automatically picks an appropriate retriever from multiple different vector databases",
|
||||
"categories": "ChatOpenAI,Multi Retrieval QA Chain,Pinecone,Chroma,Supabase,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use the agent to choose between multiple different vector databases, with the ability to use other tools",
|
||||
"categories": "Buffer Memory,ChatOpenAI,Chain Tool,Retrieval QA Chain,Redis,Faiss,Conversational Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
@@ -964,10 +966,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "plainText_0-output-document-Document",
|
||||
"id": "plainText_0-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "plainText_0-output-text-string|json",
|
||||
@@ -1501,10 +1503,10 @@
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "plainText_1-output-document-Document",
|
||||
"id": "plainText_1-output-document-Document|json",
|
||||
"name": "document",
|
||||
"label": "Document",
|
||||
"type": "Document"
|
||||
"type": "Document | json"
|
||||
},
|
||||
{
|
||||
"id": "plainText_1-output-text-string|json",
|
||||
@@ -1721,11 +1723,11 @@
|
||||
},
|
||||
{
|
||||
"source": "plainText_0",
|
||||
"sourceHandle": "plainText_0-output-document-Document",
|
||||
"sourceHandle": "plainText_0-output-document-Document|json",
|
||||
"target": "redis_0",
|
||||
"targetHandle": "redis_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "plainText_0-plainText_0-output-document-Document-redis_0-redis_0-input-document-Document",
|
||||
"id": "plainText_0-plainText_0-output-document-Document|json-redis_0-redis_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
@@ -1776,11 +1778,11 @@
|
||||
},
|
||||
{
|
||||
"source": "plainText_1",
|
||||
"sourceHandle": "plainText_1-output-document-Document",
|
||||
"sourceHandle": "plainText_1-output-document-Document|json",
|
||||
"target": "faiss_0",
|
||||
"targetHandle": "faiss_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "plainText_1-plainText_1-output-document-Document-faiss_0-faiss_0-input-document-Document",
|
||||
"id": "plainText_1-plainText_1-output-document-Document|json-faiss_0-faiss_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "An agent that uses OpenAI's Function Calling functionality to pick the tool and args to call",
|
||||
"categories": "Buffer Memory,Custom Tool, SerpAPI,OpenAI Function,Calculator Tool,ChatOpenAI,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "OpenAI Assistant that has instructions and can leverage models, tools, and knowledge to respond to user queries",
|
||||
"categories": "Custom Tool, SerpAPI,OpenAI Assistant,Calculator Tool,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "NEW",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"description": "Use chat history to rephrase user question, and answer the rephrased question using retrieved docs from vector store",
|
||||
"categories": "ChatOpenAI,LLM Chain,SingleStore,Langchain",
|
||||
"badge": "POPULAR",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use output from a chain as prompt for another chain",
|
||||
"categories": "Custom Tool,OpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -0,0 +1,549 @@
|
||||
{
|
||||
"description": "Stateless query engine designed to answer question over your data using LlamaIndex",
|
||||
"categories": "ChatAnthropic,Compact and Refine,Pinecone,LlamaIndex",
|
||||
"badge": "NEW",
|
||||
"framework": "LlamaIndex",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
"height": 382,
|
||||
"id": "queryEngine_0",
|
||||
"position": {
|
||||
"x": 1407.9610494306783,
|
||||
"y": 241.12144405808692
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "queryEngine_0",
|
||||
"label": "Query Engine",
|
||||
"version": 1,
|
||||
"name": "queryEngine",
|
||||
"type": "QueryEngine",
|
||||
"baseClasses": ["QueryEngine"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Engine",
|
||||
"description": "Simple query engine built to answer question over your data, without memory",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Return Source Documents",
|
||||
"name": "returnSourceDocuments",
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"id": "queryEngine_0-input-returnSourceDocuments-boolean"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Vector Store Retriever",
|
||||
"name": "vectorStoreRetriever",
|
||||
"type": "VectorIndexRetriever",
|
||||
"id": "queryEngine_0-input-vectorStoreRetriever-VectorIndexRetriever"
|
||||
},
|
||||
{
|
||||
"label": "Response Synthesizer",
|
||||
"name": "responseSynthesizer",
|
||||
"type": "ResponseSynthesizer",
|
||||
"description": "ResponseSynthesizer is responsible for sending the query, nodes, and prompt templates to the LLM to generate a response. See <a target=\"_blank\" href=\"https://ts.llamaindex.ai/modules/low_level/response_synthesizer\">more</a>",
|
||||
"optional": true,
|
||||
"id": "queryEngine_0-input-responseSynthesizer-ResponseSynthesizer"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"vectorStoreRetriever": "{{pineconeLlamaIndex_0.data.instance}}",
|
||||
"responseSynthesizer": "{{compactrefineLlamaIndex_0.data.instance}}",
|
||||
"returnSourceDocuments": true
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "queryEngine_0-output-queryEngine-QueryEngine",
|
||||
"name": "queryEngine",
|
||||
"label": "QueryEngine",
|
||||
"type": "QueryEngine"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1407.9610494306783,
|
||||
"y": 241.12144405808692
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 585,
|
||||
"id": "pineconeLlamaIndex_0",
|
||||
"position": {
|
||||
"x": 977.3886641397302,
|
||||
"y": -261.2253031641797
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "pineconeLlamaIndex_0",
|
||||
"label": "Pinecone",
|
||||
"version": 1,
|
||||
"name": "pineconeLlamaIndex",
|
||||
"type": "Pinecone",
|
||||
"baseClasses": ["Pinecone", "VectorIndexRetriever"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Vector Stores",
|
||||
"description": "Upsert embedded data and perform similarity search upon query using Pinecone, a leading fully managed hosted vector database",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["pineconeApi"],
|
||||
"id": "pineconeLlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Index",
|
||||
"name": "pineconeIndex",
|
||||
"type": "string",
|
||||
"id": "pineconeLlamaIndex_0-input-pineconeIndex-string"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Namespace",
|
||||
"name": "pineconeNamespace",
|
||||
"type": "string",
|
||||
"placeholder": "my-first-namespace",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "pineconeLlamaIndex_0-input-pineconeNamespace-string"
|
||||
},
|
||||
{
|
||||
"label": "Pinecone Metadata Filter",
|
||||
"name": "pineconeMetadataFilter",
|
||||
"type": "json",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "pineconeLlamaIndex_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": "pineconeLlamaIndex_0-input-topK-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Document",
|
||||
"name": "document",
|
||||
"type": "Document",
|
||||
"list": true,
|
||||
"optional": true,
|
||||
"id": "pineconeLlamaIndex_0-input-document-Document"
|
||||
},
|
||||
{
|
||||
"label": "Chat Model",
|
||||
"name": "model",
|
||||
"type": "BaseChatModel_LlamaIndex",
|
||||
"id": "pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex"
|
||||
},
|
||||
{
|
||||
"label": "Embeddings",
|
||||
"name": "embeddings",
|
||||
"type": "BaseEmbedding_LlamaIndex",
|
||||
"id": "pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"document": "",
|
||||
"model": "{{chatAnthropic_LlamaIndex_0.data.instance}}",
|
||||
"embeddings": "{{openAIEmbedding_LlamaIndex_0.data.instance}}",
|
||||
"pineconeIndex": "",
|
||||
"pineconeNamespace": "",
|
||||
"pineconeMetadataFilter": "",
|
||||
"topK": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "pineconeLlamaIndex_0-output-retriever-Pinecone|VectorIndexRetriever",
|
||||
"name": "retriever",
|
||||
"label": "Pinecone Retriever",
|
||||
"type": "Pinecone | VectorIndexRetriever"
|
||||
},
|
||||
{
|
||||
"id": "pineconeLlamaIndex_0-output-retriever-Pinecone|VectorStoreIndex",
|
||||
"name": "vectorStore",
|
||||
"label": "Pinecone Vector Store Index",
|
||||
"type": "Pinecone | VectorStoreIndex"
|
||||
}
|
||||
],
|
||||
"default": "retriever"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "retriever"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 977.3886641397302,
|
||||
"y": -261.2253031641797
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 334,
|
||||
"id": "openAIEmbedding_LlamaIndex_0",
|
||||
"position": {
|
||||
"x": 529.8690713844503,
|
||||
"y": -18.955726653613254
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "openAIEmbedding_LlamaIndex_0",
|
||||
"label": "OpenAI Embedding",
|
||||
"version": 1,
|
||||
"name": "openAIEmbedding_LlamaIndex",
|
||||
"type": "OpenAIEmbedding",
|
||||
"baseClasses": ["OpenAIEmbedding", "BaseEmbedding_LlamaIndex", "BaseEmbedding"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Embeddings",
|
||||
"description": "OpenAI Embedding specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["openAIApi"],
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "text-embedding-3-large",
|
||||
"name": "text-embedding-3-large"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-3-small",
|
||||
"name": "text-embedding-3-small"
|
||||
},
|
||||
{
|
||||
"label": "text-embedding-ada-002",
|
||||
"name": "text-embedding-ada-002"
|
||||
}
|
||||
],
|
||||
"default": "text-embedding-ada-002",
|
||||
"optional": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-timeout-number"
|
||||
},
|
||||
{
|
||||
"label": "BasePath",
|
||||
"name": "basepath",
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "openAIEmbedding_LlamaIndex_0-input-basepath-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"timeout": "",
|
||||
"basepath": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding",
|
||||
"name": "openAIEmbedding_LlamaIndex",
|
||||
"label": "OpenAIEmbedding",
|
||||
"type": "OpenAIEmbedding | BaseEmbedding_LlamaIndex | BaseEmbedding"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 529.8690713844503,
|
||||
"y": -18.955726653613254
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 749,
|
||||
"id": "compactrefineLlamaIndex_0",
|
||||
"position": {
|
||||
"x": 170.71031618977543,
|
||||
"y": -33.83233752386292
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "compactrefineLlamaIndex_0",
|
||||
"label": "Compact and Refine",
|
||||
"version": 1,
|
||||
"name": "compactrefineLlamaIndex",
|
||||
"type": "CompactRefine",
|
||||
"baseClasses": ["CompactRefine", "ResponseSynthesizer"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Response Synthesizer",
|
||||
"description": "CompactRefine is a slight variation of Refine that first compacts the text chunks into the smallest possible number of chunks.",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Refine Prompt",
|
||||
"name": "refinePrompt",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"default": "The original query is as follows: {query}\nWe have provided an existing answer: {existingAnswer}\nWe have the opportunity to refine the existing answer (only if needed) with some more context below.\n------------\n{context}\n------------\nGiven the new context, refine the original answer to better answer the query. If the context isn't useful, return the original answer.\nRefined Answer:",
|
||||
"warning": "Prompt can contains no variables, or up to 3 variables. Variables must be {existingAnswer}, {context} and {query}",
|
||||
"optional": true,
|
||||
"id": "compactrefineLlamaIndex_0-input-refinePrompt-string"
|
||||
},
|
||||
{
|
||||
"label": "Text QA Prompt",
|
||||
"name": "textQAPrompt",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"default": "Context information is below.\n---------------------\n{context}\n---------------------\nGiven the context information and not prior knowledge, answer the query.\nQuery: {query}\nAnswer:",
|
||||
"warning": "Prompt can contains no variables, or up to 2 variables. Variables must be {context} and {query}",
|
||||
"optional": true,
|
||||
"id": "compactrefineLlamaIndex_0-input-textQAPrompt-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"refinePrompt": "The original query is as follows: {query}\nWe have provided an existing answer: {existingAnswer}\nWe have the opportunity to refine the existing answer (only if needed) with some more context below.\n------------\n{context}\n------------\nGiven the new context, refine the original answer to better answer the query. If the context isn't useful, return the original answer.\nRefined Answer:",
|
||||
"textQAPrompt": "Context information:\n<context>\n{context}\n</context>\nGiven the context information and not prior knowledge, answer the query.\nQuery: {query}"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "compactrefineLlamaIndex_0-output-compactrefineLlamaIndex-CompactRefine|ResponseSynthesizer",
|
||||
"name": "compactrefineLlamaIndex",
|
||||
"label": "CompactRefine",
|
||||
"type": "CompactRefine | ResponseSynthesizer"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 170.71031618977543,
|
||||
"y": -33.83233752386292
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 529,
|
||||
"id": "chatAnthropic_LlamaIndex_0",
|
||||
"position": {
|
||||
"x": 521.3530883359147,
|
||||
"y": -584.8241219614786
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatAnthropic_LlamaIndex_0",
|
||||
"label": "ChatAnthropic",
|
||||
"version": 1,
|
||||
"name": "chatAnthropic_LlamaIndex",
|
||||
"type": "ChatAnthropic",
|
||||
"baseClasses": ["ChatAnthropic", "BaseChatModel_LlamaIndex"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Chat Models",
|
||||
"description": "Wrapper around ChatAnthropic LLM specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["anthropicApi"],
|
||||
"id": "chatAnthropic_LlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "claude-2",
|
||||
"name": "claude-2",
|
||||
"description": "Claude 2 latest major version, automatically get updates to the model as they are released"
|
||||
},
|
||||
{
|
||||
"label": "claude-2.1",
|
||||
"name": "claude-2.1",
|
||||
"description": "Claude 2 latest full version"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-1",
|
||||
"name": "claude-instant-1",
|
||||
"description": "Claude Instant latest major version, automatically get updates to the model as they are released"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1",
|
||||
"name": "claude-v1"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1-100k",
|
||||
"name": "claude-v1-100k"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1.0",
|
||||
"name": "claude-v1.0"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1.2",
|
||||
"name": "claude-v1.2"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1.3",
|
||||
"name": "claude-v1.3"
|
||||
},
|
||||
{
|
||||
"label": "claude-v1.3-100k",
|
||||
"name": "claude-v1.3-100k"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-v1",
|
||||
"name": "claude-instant-v1"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-v1-100k",
|
||||
"name": "claude-instant-v1-100k"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-v1.0",
|
||||
"name": "claude-instant-v1.0"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-v1.1",
|
||||
"name": "claude-instant-v1.1"
|
||||
},
|
||||
{
|
||||
"label": "claude-instant-v1.1-100k",
|
||||
"name": "claude-instant-v1.1-100k"
|
||||
}
|
||||
],
|
||||
"default": "claude-2",
|
||||
"optional": true,
|
||||
"id": "chatAnthropic_LlamaIndex_0-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatAnthropic_LlamaIndex_0-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokensToSample",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatAnthropic_LlamaIndex_0-input-maxTokensToSample-number"
|
||||
},
|
||||
{
|
||||
"label": "Top P",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatAnthropic_LlamaIndex_0-input-topP-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"modelName": "claude-2",
|
||||
"temperature": 0.9,
|
||||
"maxTokensToSample": "",
|
||||
"topP": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatAnthropic_LlamaIndex_0-output-chatAnthropic_LlamaIndex-ChatAnthropic|BaseChatModel_LlamaIndex",
|
||||
"name": "chatAnthropic_LlamaIndex",
|
||||
"label": "ChatAnthropic",
|
||||
"type": "ChatAnthropic | BaseChatModel_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 521.3530883359147,
|
||||
"y": -584.8241219614786
|
||||
},
|
||||
"dragging": false
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "pineconeLlamaIndex_0",
|
||||
"sourceHandle": "pineconeLlamaIndex_0-output-pineconeLlamaIndex-Pinecone|VectorIndexRetriever",
|
||||
"target": "queryEngine_0",
|
||||
"targetHandle": "queryEngine_0-input-vectorStoreRetriever-VectorIndexRetriever",
|
||||
"type": "buttonedge",
|
||||
"id": "pineconeLlamaIndex_0-pineconeLlamaIndex_0-output-pineconeLlamaIndex-Pinecone|VectorIndexRetriever-queryEngine_0-queryEngine_0-input-vectorStoreRetriever-VectorIndexRetriever",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "openAIEmbedding_LlamaIndex_0",
|
||||
"sourceHandle": "openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding",
|
||||
"target": "pineconeLlamaIndex_0",
|
||||
"targetHandle": "pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "openAIEmbedding_LlamaIndex_0-openAIEmbedding_LlamaIndex_0-output-openAIEmbedding_LlamaIndex-OpenAIEmbedding|BaseEmbedding_LlamaIndex|BaseEmbedding-pineconeLlamaIndex_0-pineconeLlamaIndex_0-input-embeddings-BaseEmbedding_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "compactrefineLlamaIndex_0",
|
||||
"sourceHandle": "compactrefineLlamaIndex_0-output-compactrefineLlamaIndex-CompactRefine|ResponseSynthesizer",
|
||||
"target": "queryEngine_0",
|
||||
"targetHandle": "queryEngine_0-input-responseSynthesizer-ResponseSynthesizer",
|
||||
"type": "buttonedge",
|
||||
"id": "compactrefineLlamaIndex_0-compactrefineLlamaIndex_0-output-compactrefineLlamaIndex-CompactRefine|ResponseSynthesizer-queryEngine_0-queryEngine_0-input-responseSynthesizer-ResponseSynthesizer",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "chatAnthropic_LlamaIndex_0",
|
||||
"sourceHandle": "chatAnthropic_LlamaIndex_0-output-chatAnthropic_LlamaIndex-ChatAnthropic|BaseChatModel_LlamaIndex",
|
||||
"target": "pineconeLlamaIndex_0",
|
||||
"targetHandle": "pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "chatAnthropic_LlamaIndex_0-chatAnthropic_LlamaIndex_0-output-chatAnthropic_LlamaIndex-ChatAnthropic|BaseChatModel_LlamaIndex-pineconeLlamaIndex_0-pineconeLlamaIndex_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "An agent that uses ReAct logic to decide what action to take",
|
||||
"categories": "Calculator Tool,SerpAPI,ChatOpenAI,MRKL Agent,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Use Replicate API that runs Llama 13b v2 model with LLMChain",
|
||||
"categories": "Replicate,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Answer questions over a SQL database",
|
||||
"categories": "ChatOpenAI,Sql Database Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Manually construct prompts to query a SQL database",
|
||||
"categories": "IfElse Function,Variable Set/Get,Custom JS Function,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "new",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
{
|
||||
"description": "Simple chat engine to handle back and forth conversations using LlamaIndex",
|
||||
"categories": "BufferMemory,AzureChatOpenAI,LlamaIndex",
|
||||
"framework": "LlamaIndex",
|
||||
"badge": "NEW",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
"height": 462,
|
||||
"id": "simpleChatEngine_0",
|
||||
"position": {
|
||||
"x": 1210.127368000538,
|
||||
"y": 324.98110560103896
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "simpleChatEngine_0",
|
||||
"label": "Simple Chat Engine",
|
||||
"version": 1,
|
||||
"name": "simpleChatEngine",
|
||||
"type": "SimpleChatEngine",
|
||||
"baseClasses": ["SimpleChatEngine"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Engine",
|
||||
"description": "Simple engine to handle back and forth conversations",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "System Message",
|
||||
"name": "systemMessagePrompt",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"optional": true,
|
||||
"placeholder": "You are a helpful assistant",
|
||||
"id": "simpleChatEngine_0-input-systemMessagePrompt-string"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Chat Model",
|
||||
"name": "model",
|
||||
"type": "BaseChatModel_LlamaIndex",
|
||||
"id": "simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex"
|
||||
},
|
||||
{
|
||||
"label": "Memory",
|
||||
"name": "memory",
|
||||
"type": "BaseChatMemory",
|
||||
"id": "simpleChatEngine_0-input-memory-BaseChatMemory"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"model": "{{azureChatOpenAI_LlamaIndex_0.data.instance}}",
|
||||
"memory": "{{bufferMemory_0.data.instance}}",
|
||||
"systemMessagePrompt": "You are a helpful assistant."
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "simpleChatEngine_0-output-simpleChatEngine-SimpleChatEngine",
|
||||
"name": "simpleChatEngine",
|
||||
"label": "SimpleChatEngine",
|
||||
"type": "SimpleChatEngine"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"dragging": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1210.127368000538,
|
||||
"y": 324.98110560103896
|
||||
}
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 376,
|
||||
"id": "bufferMemory_0",
|
||||
"position": {
|
||||
"x": 393.9823478014782,
|
||||
"y": 415.7414943210391
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "bufferMemory_0",
|
||||
"label": "Buffer Memory",
|
||||
"version": 1,
|
||||
"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": 393.9823478014782,
|
||||
"y": 415.7414943210391
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 529,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0",
|
||||
"position": {
|
||||
"x": 746.5530862509605,
|
||||
"y": -54.107978373323306
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "azureChatOpenAI_LlamaIndex_0",
|
||||
"label": "AzureChatOpenAI",
|
||||
"version": 1,
|
||||
"name": "azureChatOpenAI_LlamaIndex",
|
||||
"type": "AzureChatOpenAI",
|
||||
"baseClasses": ["AzureChatOpenAI", "BaseChatModel_LlamaIndex"],
|
||||
"tags": ["LlamaIndex"],
|
||||
"category": "Chat Models",
|
||||
"description": "Wrapper around Azure OpenAI Chat LLM specific for LlamaIndex",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Connect Credential",
|
||||
"name": "credential",
|
||||
"type": "credential",
|
||||
"credentialNames": ["azureOpenAIApi"],
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-credential-credential"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo-16k",
|
||||
"optional": true,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-modelName-options"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokens",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-maxTokens-number"
|
||||
},
|
||||
{
|
||||
"label": "Top Probability",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-input-timeout-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [],
|
||||
"inputs": {
|
||||
"modelName": "gpt-3.5-turbo-16k",
|
||||
"temperature": 0.9,
|
||||
"maxTokens": "",
|
||||
"topP": "",
|
||||
"timeout": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"name": "azureChatOpenAI_LlamaIndex",
|
||||
"label": "AzureChatOpenAI",
|
||||
"type": "AzureChatOpenAI | BaseChatModel_LlamaIndex"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 746.5530862509605,
|
||||
"y": -54.107978373323306
|
||||
},
|
||||
"dragging": false
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "bufferMemory_0",
|
||||
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
|
||||
"target": "simpleChatEngine_0",
|
||||
"targetHandle": "simpleChatEngine_0-input-memory-BaseChatMemory",
|
||||
"type": "buttonedge",
|
||||
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-simpleChatEngine_0-simpleChatEngine_0-input-memory-BaseChatMemory",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "azureChatOpenAI_LlamaIndex_0",
|
||||
"sourceHandle": "azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex",
|
||||
"target": "simpleChatEngine_0",
|
||||
"targetHandle": "simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"type": "buttonedge",
|
||||
"id": "azureChatOpenAI_LlamaIndex_0-azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex-simpleChatEngine_0-simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Basic example of Conversation Chain with built-in memory - works exactly like ChatGPT",
|
||||
"categories": "Buffer Memory,ChatOpenAI,Conversation Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "POPULAR",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Basic example of stateless (no memory) LLM Chain with a Prompt Template and LLM Model",
|
||||
"categories": "OpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Return response as a specified JSON structure instead of a string/text",
|
||||
"categories": "Structured Output Parser,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "NEW",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Language translation using LLM Chain with a Chat Prompt Template and Chat Model",
|
||||
"categories": "Chat Prompt Template,ChatOpenAI,LLM Chain,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"description": "QA chain for Vectara",
|
||||
"categories": "Vectara QA Chain,Vectara,Langchain",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Conversational Agent with ability to visit a website and extract information",
|
||||
"categories": "Buffer Memory,Web Browser,ChatOpenAI,Conversational Agent",
|
||||
"framework": "Langchain",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"description": "Scrape web pages for QnA with long term memory Motorhead and return source documents",
|
||||
"categories": "HtmlToMarkdown,Cheerio Web Scraper,ChatOpenAI,Redis,Pinecone,Langchain",
|
||||
"framework": "Langchain",
|
||||
"badge": "POPULAR",
|
||||
"nodes": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "add_contact_hubspot",
|
||||
"framework": "Langchain",
|
||||
"description": "Add new contact to Hubspot",
|
||||
"color": "linear-gradient(rgb(85,198,123), rgb(0,230,99))",
|
||||
"iconSrc": "https://cdn.worldvectorlogo.com/logos/hubspot-1.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "add_airtable",
|
||||
"framework": "Langchain",
|
||||
"description": "Add column1, column2 to Airtable",
|
||||
"color": "linear-gradient(rgb(125,71,222), rgb(128,102,23))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/airtable.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "todays_date_time",
|
||||
"framework": "Langchain",
|
||||
"description": "Useful to get todays day, date and time.",
|
||||
"color": "linear-gradient(rgb(117,118,129), rgb(230,10,250))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/javascript.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "get_stock_movers",
|
||||
"framework": "Langchain",
|
||||
"description": "Get the stocks that has biggest price/volume moves, e.g. actives, gainers, losers, etc.",
|
||||
"iconSrc": "https://rapidapi.com/cdn/images?url=https://rapidapi-prod-apis.s3.amazonaws.com/9c/e743343bdd41edad39a3fdffd5b974/016c33699f51603ae6fe4420c439124b.png",
|
||||
"color": "linear-gradient(rgb(191,202,167), rgb(143,202,246))",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "make_webhook",
|
||||
"framework": "Langchain",
|
||||
"description": "Useful when you need to send message to Discord",
|
||||
"color": "linear-gradient(rgb(19,94,2), rgb(19,124,59))",
|
||||
"iconSrc": "https://github.com/FlowiseAI/Flowise/assets/26460777/517fdab2-8a6e-4781-b3c8-fb92cc78aa0b",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "send_message_to_discord_channel",
|
||||
"framework": "Langchain",
|
||||
"description": "Send message to Discord channel",
|
||||
"color": "linear-gradient(rgb(155,190,84), rgb(176,69,245))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/discord-icon.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "send_message_to_slack_channel",
|
||||
"framework": "Langchain",
|
||||
"description": "Send message to Slack channel",
|
||||
"color": "linear-gradient(rgb(155,190,84), rgb(176,69,245))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/slack-icon.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "send_message_to_teams_channel",
|
||||
"framework": "Langchain",
|
||||
"description": "Send message to Teams channel",
|
||||
"color": "linear-gradient(rgb(155,190,84), rgb(176,69,245))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/microsoft-teams.svg",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "sendgrid_email",
|
||||
"framework": "Langchain",
|
||||
"description": "Send email using SendGrid",
|
||||
"color": "linear-gradient(rgb(230,108,70), rgb(222,4,98))",
|
||||
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/sendgrid-icon.svg",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "flowise",
|
||||
"version": "1.4.12",
|
||||
"version": "1.5.0",
|
||||
"description": "Flowiseai Server",
|
||||
"main": "dist/index",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -18,6 +18,7 @@ export default class Start extends Command {
|
||||
static flags = {
|
||||
FLOWISE_USERNAME: Flags.string(),
|
||||
FLOWISE_PASSWORD: Flags.string(),
|
||||
FLOWISE_FILE_SIZE_LIMIT: Flags.string(),
|
||||
PORT: Flags.string(),
|
||||
CORS_ORIGINS: Flags.string(),
|
||||
IFRAME_ORIGINS: Flags.string(),
|
||||
@@ -95,6 +96,9 @@ export default class Start extends Command {
|
||||
// Storage
|
||||
if (flags.BLOB_STORAGE_PATH) process.env.BLOB_STORAGE_PATH = flags.BLOB_STORAGE_PATH
|
||||
|
||||
//API Configuration
|
||||
if (flags.FLOWISE_FILE_SIZE_LIMIT) process.env.FLOWISE_FILE_SIZE_LIMIT = flags.FLOWISE_FILE_SIZE_LIMIT
|
||||
|
||||
// Credentials
|
||||
if (flags.SECRETKEY_PATH) process.env.SECRETKEY_PATH = flags.SECRETKEY_PATH
|
||||
if (flags.FLOWISE_SECRETKEY_OVERWRITE) process.env.FLOWISE_SECRETKEY_OVERWRITE = flags.FLOWISE_SECRETKEY_OVERWRITE
|
||||
|
||||
@@ -133,8 +133,9 @@ export class App {
|
||||
|
||||
async config(socketIO?: Server) {
|
||||
// Limit is needed to allow sending/receiving base64 encoded string
|
||||
this.app.use(express.json({ limit: '50mb' }))
|
||||
this.app.use(express.urlencoded({ limit: '50mb', extended: true }))
|
||||
const flowise_file_size_limit = process.env.FLOWISE_FILE_SIZE_LIMIT ?? '50mb'
|
||||
this.app.use(express.json({ limit: flowise_file_size_limit }))
|
||||
this.app.use(express.urlencoded({ limit: flowise_file_size_limit, extended: true }))
|
||||
|
||||
if (process.env.NUMBER_OF_PROXIES && parseInt(process.env.NUMBER_OF_PROXIES) > 0)
|
||||
this.app.set('trust proxy', parseInt(process.env.NUMBER_OF_PROXIES))
|
||||
@@ -199,7 +200,7 @@ export class App {
|
||||
this.app.get('/api/v1/ip', (request, response) => {
|
||||
response.send({
|
||||
ip: request.ip,
|
||||
msg: 'See the returned IP address in the response. If it matches your current IP address ( which you can get by going to http://ip.nfriedly.com/ or https://api.ipify.org/ ), then the number of proxies is correct and the rate limiter should now work correctly. If not, increase the number of proxies by 1 until the IP address matches your own. Visit https://docs.flowiseai.com/deployment#rate-limit-setup-guide for more information.'
|
||||
msg: 'Check returned IP address in the response. If it matches your current IP address ( which you can get by going to http://ip.nfriedly.com/ or https://api.ipify.org/ ), then the number of proxies is correct and the rate limiter should now work correctly. If not, increase the number of proxies by 1 and restart Cloud-Hosted Flowise until the IP address matches your own. Visit https://docs.flowiseai.com/configuration/rate-limit#cloud-hosted-rate-limit-setup-guide for more information.'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -509,7 +510,12 @@ export class App {
|
||||
const isEndingNode = endingNodeData?.outputs?.output === 'EndingNode'
|
||||
|
||||
if (!isEndingNode) {
|
||||
if (endingNodeData && endingNodeData.category !== 'Chains' && endingNodeData.category !== 'Agents') {
|
||||
if (
|
||||
endingNodeData &&
|
||||
endingNodeData.category !== 'Chains' &&
|
||||
endingNodeData.category !== 'Agents' &&
|
||||
endingNodeData.category !== 'Engine'
|
||||
) {
|
||||
return res.status(500).send(`Ending node must be either a Chain or Agent`)
|
||||
}
|
||||
}
|
||||
@@ -542,6 +548,7 @@ export class App {
|
||||
const chatId = req.query?.chatId as string | undefined
|
||||
const memoryType = req.query?.memoryType as string | undefined
|
||||
const sessionId = req.query?.sessionId as string | undefined
|
||||
const messageId = req.query?.messageId as string | undefined
|
||||
const startDate = req.query?.startDate as string | undefined
|
||||
const endDate = req.query?.endDate as string | undefined
|
||||
let chatTypeFilter = req.query?.chatType as chatType | undefined
|
||||
@@ -569,7 +576,8 @@ export class App {
|
||||
memoryType,
|
||||
sessionId,
|
||||
startDate,
|
||||
endDate
|
||||
endDate,
|
||||
messageId
|
||||
)
|
||||
return res.json(chatmessages)
|
||||
})
|
||||
@@ -1224,8 +1232,14 @@ export class App {
|
||||
this.app.get('/api/v1/fetch-links', async (req: Request, res: Response) => {
|
||||
const url = decodeURIComponent(req.query.url as string)
|
||||
const relativeLinksMethod = req.query.relativeLinksMethod as string
|
||||
if (!relativeLinksMethod) {
|
||||
return res.status(500).send('Please choose a Relative Links Method in Additional Parameters.')
|
||||
}
|
||||
|
||||
const limit = parseInt(req.query.limit as string)
|
||||
if (process.env.DEBUG === 'true') console.info(`Start ${relativeLinksMethod}`)
|
||||
const links: string[] = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, 0) : await xmlScrape(url, 0)
|
||||
const links: string[] = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, limit) : await xmlScrape(url, limit)
|
||||
if (process.env.DEBUG === 'true') console.info(`Finish ${relativeLinksMethod}`)
|
||||
|
||||
res.json({ status: 'OK', links })
|
||||
})
|
||||
@@ -1299,50 +1313,52 @@ export class App {
|
||||
// Marketplaces
|
||||
// ----------------------------------------
|
||||
|
||||
// Get all chatflows for marketplaces
|
||||
this.app.get('/api/v1/marketplaces/chatflows', async (req: Request, res: Response) => {
|
||||
const marketplaceDir = path.join(__dirname, '..', 'marketplaces', 'chatflows')
|
||||
const jsonsInDir = fs.readdirSync(marketplaceDir).filter((file) => path.extname(file) === '.json')
|
||||
const templates: any[] = []
|
||||
// Get all templates for marketplaces
|
||||
this.app.get('/api/v1/marketplaces/templates', async (req: Request, res: Response) => {
|
||||
let marketplaceDir = path.join(__dirname, '..', 'marketplaces', 'chatflows')
|
||||
let jsonsInDir = fs.readdirSync(marketplaceDir).filter((file) => path.extname(file) === '.json')
|
||||
let templates: any[] = []
|
||||
jsonsInDir.forEach((file, index) => {
|
||||
const filePath = path.join(__dirname, '..', 'marketplaces', 'chatflows', file)
|
||||
const fileData = fs.readFileSync(filePath)
|
||||
const fileDataObj = JSON.parse(fileData.toString())
|
||||
const template = {
|
||||
id: index,
|
||||
name: file.split('.json')[0],
|
||||
templateName: file.split('.json')[0],
|
||||
flowData: fileData.toString(),
|
||||
badge: fileDataObj?.badge,
|
||||
framework: fileDataObj?.framework,
|
||||
categories: fileDataObj?.categories,
|
||||
type: 'Chatflow',
|
||||
description: fileDataObj?.description || ''
|
||||
}
|
||||
templates.push(template)
|
||||
})
|
||||
|
||||
marketplaceDir = path.join(__dirname, '..', 'marketplaces', 'tools')
|
||||
jsonsInDir = fs.readdirSync(marketplaceDir).filter((file) => path.extname(file) === '.json')
|
||||
jsonsInDir.forEach((file, index) => {
|
||||
const filePath = path.join(__dirname, '..', 'marketplaces', 'tools', file)
|
||||
const fileData = fs.readFileSync(filePath)
|
||||
const fileDataObj = JSON.parse(fileData.toString())
|
||||
const template = {
|
||||
...fileDataObj,
|
||||
id: index,
|
||||
type: 'Tool',
|
||||
framework: fileDataObj?.framework,
|
||||
badge: fileDataObj?.badge,
|
||||
categories: '',
|
||||
templateName: file.split('.json')[0]
|
||||
}
|
||||
templates.push(template)
|
||||
})
|
||||
const FlowiseDocsQnA = templates.find((tmp) => tmp.name === 'Flowise Docs QnA')
|
||||
const FlowiseDocsQnAIndex = templates.findIndex((tmp) => tmp.name === 'Flowise Docs QnA')
|
||||
if (FlowiseDocsQnA && FlowiseDocsQnAIndex > 0) {
|
||||
templates.splice(FlowiseDocsQnAIndex, 1)
|
||||
templates.unshift(FlowiseDocsQnA)
|
||||
}
|
||||
return res.json(templates)
|
||||
})
|
||||
|
||||
// Get all tools for marketplaces
|
||||
this.app.get('/api/v1/marketplaces/tools', async (req: Request, res: Response) => {
|
||||
const marketplaceDir = path.join(__dirname, '..', 'marketplaces', 'tools')
|
||||
const jsonsInDir = fs.readdirSync(marketplaceDir).filter((file) => path.extname(file) === '.json')
|
||||
const templates: any[] = []
|
||||
jsonsInDir.forEach((file, index) => {
|
||||
const filePath = path.join(__dirname, '..', 'marketplaces', 'tools', file)
|
||||
const fileData = fs.readFileSync(filePath)
|
||||
const fileDataObj = JSON.parse(fileData.toString())
|
||||
const template = {
|
||||
...fileDataObj,
|
||||
id: index,
|
||||
templateName: file.split('.json')[0]
|
||||
}
|
||||
templates.push(template)
|
||||
})
|
||||
return res.json(templates)
|
||||
return res.json(templates.sort((a, b) => a.templateName.localeCompare(b.templateName)))
|
||||
})
|
||||
|
||||
// ----------------------------------------
|
||||
@@ -1573,7 +1589,8 @@ export class App {
|
||||
memoryType?: string,
|
||||
sessionId?: string,
|
||||
startDate?: string,
|
||||
endDate?: string
|
||||
endDate?: string,
|
||||
messageId?: string
|
||||
): Promise<ChatMessage[]> {
|
||||
let fromDate
|
||||
if (startDate) fromDate = new Date(startDate)
|
||||
@@ -1587,8 +1604,9 @@ export class App {
|
||||
chatType,
|
||||
chatId,
|
||||
memoryType: memoryType ?? (chatId ? IsNull() : undefined),
|
||||
sessionId: sessionId ?? (chatId ? IsNull() : undefined),
|
||||
createdDate: toDate && fromDate ? Between(fromDate, toDate) : undefined
|
||||
sessionId: sessionId ?? undefined,
|
||||
createdDate: toDate && fromDate ? Between(fromDate, toDate) : undefined,
|
||||
id: messageId ?? undefined
|
||||
},
|
||||
order: {
|
||||
createdDate: sortOrder === 'DESC' ? 'DESC' : 'ASC'
|
||||
@@ -1888,7 +1906,12 @@ export class App {
|
||||
const isEndingNode = endingNodeData?.outputs?.output === 'EndingNode'
|
||||
|
||||
if (!isEndingNode) {
|
||||
if (endingNodeData && endingNodeData.category !== 'Chains' && endingNodeData.category !== 'Agents') {
|
||||
if (
|
||||
endingNodeData &&
|
||||
endingNodeData.category !== 'Chains' &&
|
||||
endingNodeData.category !== 'Agents' &&
|
||||
endingNodeData.category !== 'Engine'
|
||||
) {
|
||||
return res.status(500).send(`Ending node must be either a Chain or Agent`)
|
||||
}
|
||||
|
||||
|
||||
@@ -821,7 +821,16 @@ export const findAvailableConfigs = (reactFlowNodes: IReactFlowNode[], component
|
||||
*/
|
||||
export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNodeData: INodeData) => {
|
||||
const streamAvailableLLMs = {
|
||||
'Chat Models': ['azureChatOpenAI', 'chatOpenAI', 'chatAnthropic', 'chatOllama', 'awsChatBedrock', 'chatMistralAI'],
|
||||
'Chat Models': [
|
||||
'azureChatOpenAI',
|
||||
'chatOpenAI',
|
||||
'chatOpenAI_LlamaIndex',
|
||||
'chatAnthropic',
|
||||
'chatAnthropic_LlamaIndex',
|
||||
'chatOllama',
|
||||
'awsChatBedrock',
|
||||
'chatMistralAI'
|
||||
],
|
||||
LLMs: ['azureOpenAI', 'openAI', 'ollama']
|
||||
}
|
||||
|
||||
@@ -844,6 +853,9 @@ export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNod
|
||||
// Agent that are available to stream
|
||||
const whitelistAgents = ['openAIFunctionAgent', 'csvAgent', 'airtableAgent', 'conversationalRetrievalAgent']
|
||||
isValidChainOrAgent = whitelistAgents.includes(endingNodeData.name)
|
||||
} else if (endingNodeData.category === 'Engine') {
|
||||
const whitelistEngine = ['contextChatEngine', 'simpleChatEngine', 'queryEngine', 'subQuestionQueryEngine']
|
||||
isValidChainOrAgent = whitelistEngine.includes(endingNodeData.name)
|
||||
}
|
||||
|
||||
// If no output parser, flow is available to stream
|
||||
|
||||
Reference in New Issue
Block a user