mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-25 23:01:12 +03:00
560 lines
23 KiB
JSON
560 lines
23 KiB
JSON
{
|
|
"description": "Github repo QnA using conversational retrieval QA chain",
|
|
"nodes": [
|
|
{
|
|
"width": 300,
|
|
"height": 376,
|
|
"id": "recursiveCharacterTextSplitter_1",
|
|
"position": {
|
|
"x": 447.1038086695898,
|
|
"y": 126.52301921543597
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "recursiveCharacterTextSplitter_1",
|
|
"label": "Recursive Character Text Splitter",
|
|
"name": "recursiveCharacterTextSplitter",
|
|
"type": "RecursiveCharacterTextSplitter",
|
|
"baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter"],
|
|
"category": "Text Splitters",
|
|
"description": "Split documents recursively by different characters - starting with \"\n\n\", then \"\n\", then \" \"",
|
|
"inputParams": [
|
|
{
|
|
"label": "Chunk Size",
|
|
"name": "chunkSize",
|
|
"type": "number",
|
|
"default": 1000,
|
|
"optional": true,
|
|
"id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
|
|
},
|
|
{
|
|
"label": "Chunk Overlap",
|
|
"name": "chunkOverlap",
|
|
"type": "number",
|
|
"optional": true,
|
|
"id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"chunkSize": 1000,
|
|
"chunkOverlap": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
|
|
"name": "recursiveCharacterTextSplitter",
|
|
"label": "RecursiveCharacterTextSplitter",
|
|
"type": "RecursiveCharacterTextSplitter | TextSplitter"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"positionAbsolute": {
|
|
"x": 447.1038086695898,
|
|
"y": 126.52301921543597
|
|
},
|
|
"selected": false,
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 578,
|
|
"id": "github_1",
|
|
"position": {
|
|
"x": 836.9660489009947,
|
|
"y": -44.04171088580361
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "github_1",
|
|
"label": "Github",
|
|
"name": "github",
|
|
"type": "Document",
|
|
"baseClasses": ["Document"],
|
|
"category": "Document Loaders",
|
|
"description": "Load data from a GitHub repository",
|
|
"inputParams": [
|
|
{
|
|
"label": "Repo Link",
|
|
"name": "repoLink",
|
|
"type": "string",
|
|
"placeholder": "https://github.com/FlowiseAI/Flowise",
|
|
"id": "github_1-input-repoLink-string"
|
|
},
|
|
{
|
|
"label": "Branch",
|
|
"name": "branch",
|
|
"type": "string",
|
|
"default": "main",
|
|
"id": "github_1-input-branch-string"
|
|
},
|
|
{
|
|
"label": "Access Token",
|
|
"name": "accessToken",
|
|
"type": "password",
|
|
"placeholder": "<GITHUB_ACCESS_TOKEN>",
|
|
"optional": true,
|
|
"id": "github_1-input-accessToken-password"
|
|
},
|
|
{
|
|
"label": "Metadata",
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "github_1-input-metadata-json"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Text Splitter",
|
|
"name": "textSplitter",
|
|
"type": "TextSplitter",
|
|
"optional": true,
|
|
"id": "github_1-input-textSplitter-TextSplitter"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"repoLink": "",
|
|
"branch": "main",
|
|
"textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "github_1-output-github-Document",
|
|
"name": "github",
|
|
"label": "Document",
|
|
"type": "Document"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 836.9660489009947,
|
|
"y": -44.04171088580361
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 330,
|
|
"id": "openAIEmbeddings_1",
|
|
"position": {
|
|
"x": 833.4085562012468,
|
|
"y": 541.7875676090047
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "openAIEmbeddings_1",
|
|
"label": "OpenAI Embeddings",
|
|
"name": "openAIEmbeddings",
|
|
"type": "OpenAIEmbeddings",
|
|
"baseClasses": ["OpenAIEmbeddings", "Embeddings"],
|
|
"category": "Embeddings",
|
|
"description": "OpenAI API to generate embeddings for a given text",
|
|
"inputParams": [
|
|
{
|
|
"label": "OpenAI Api Key",
|
|
"name": "openAIApiKey",
|
|
"type": "password",
|
|
"id": "openAIEmbeddings_1-input-openAIApiKey-password"
|
|
},
|
|
{
|
|
"label": "Strip New Lines",
|
|
"name": "stripNewLines",
|
|
"type": "boolean",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_1-input-stripNewLines-boolean"
|
|
},
|
|
{
|
|
"label": "Batch Size",
|
|
"name": "batchSize",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_1-input-batchSize-number"
|
|
},
|
|
{
|
|
"label": "Timeout",
|
|
"name": "timeout",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_1-input-timeout-number"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"stripNewLines": "",
|
|
"batchSize": "",
|
|
"timeout": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
|
"name": "openAIEmbeddings",
|
|
"label": "OpenAIEmbeddings",
|
|
"type": "OpenAIEmbeddings | Embeddings"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"positionAbsolute": {
|
|
"x": 833.4085562012468,
|
|
"y": 541.7875676090047
|
|
},
|
|
"selected": false,
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 702,
|
|
"id": "pineconeUpsert_1",
|
|
"position": {
|
|
"x": 1268.7946529279823,
|
|
"y": 382.77997896801634
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "pineconeUpsert_1",
|
|
"label": "Pinecone Upsert Document",
|
|
"name": "pineconeUpsert",
|
|
"type": "Pinecone",
|
|
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
|
|
"category": "Vector Stores",
|
|
"description": "Upsert documents to Pinecone",
|
|
"inputParams": [
|
|
{
|
|
"label": "Pinecone Api Key",
|
|
"name": "pineconeApiKey",
|
|
"type": "password",
|
|
"id": "pineconeUpsert_1-input-pineconeApiKey-password"
|
|
},
|
|
{
|
|
"label": "Pinecone Environment",
|
|
"name": "pineconeEnv",
|
|
"type": "string",
|
|
"id": "pineconeUpsert_1-input-pineconeEnv-string"
|
|
},
|
|
{
|
|
"label": "Pinecone Index",
|
|
"name": "pineconeIndex",
|
|
"type": "string",
|
|
"id": "pineconeUpsert_1-input-pineconeIndex-string"
|
|
},
|
|
{
|
|
"label": "Pinecone Namespace",
|
|
"name": "pineconeNamespace",
|
|
"type": "string",
|
|
"placeholder": "my-first-namespace",
|
|
"optional": true,
|
|
"id": "pineconeUpsert_1-input-pineconeNamespace-string"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Document",
|
|
"name": "document",
|
|
"type": "Document",
|
|
"list": true,
|
|
"id": "pineconeUpsert_1-input-document-Document"
|
|
},
|
|
{
|
|
"label": "Embeddings",
|
|
"name": "embeddings",
|
|
"type": "Embeddings",
|
|
"id": "pineconeUpsert_1-input-embeddings-Embeddings"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"document": ["{{github_1.data.instance}}"],
|
|
"embeddings": "{{openAIEmbeddings_1.data.instance}}",
|
|
"pineconeEnv": "us-west4-gcp",
|
|
"pineconeIndex": "myindex",
|
|
"pineconeNamespace": "mynamespace"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"name": "output",
|
|
"label": "Output",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"id": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
|
|
"name": "retriever",
|
|
"label": "Pinecone Retriever",
|
|
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
|
|
},
|
|
{
|
|
"id": "pineconeUpsert_1-output-vectorStore-Pinecone|VectorStore",
|
|
"name": "vectorStore",
|
|
"label": "Pinecone Vector Store",
|
|
"type": "Pinecone | VectorStore"
|
|
}
|
|
],
|
|
"default": "retriever"
|
|
}
|
|
],
|
|
"outputs": {
|
|
"output": "retriever"
|
|
},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"dragging": false,
|
|
"positionAbsolute": {
|
|
"x": 1268.7946529279823,
|
|
"y": 382.77997896801634
|
|
}
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 524,
|
|
"id": "chatOpenAI_0",
|
|
"position": {
|
|
"x": 1271.1300438358664,
|
|
"y": -169.75707425097968
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "chatOpenAI_0",
|
|
"label": "ChatOpenAI",
|
|
"name": "chatOpenAI",
|
|
"type": "ChatOpenAI",
|
|
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "BaseLangChain"],
|
|
"category": "Chat Models",
|
|
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
|
"inputParams": [
|
|
{
|
|
"label": "OpenAI Api Key",
|
|
"name": "openAIApiKey",
|
|
"type": "password",
|
|
"id": "chatOpenAI_0-input-openAIApiKey-password"
|
|
},
|
|
{
|
|
"label": "Model Name",
|
|
"name": "modelName",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"label": "gpt-4",
|
|
"name": "gpt-4"
|
|
},
|
|
{
|
|
"label": "gpt-4-0314",
|
|
"name": "gpt-4-0314"
|
|
},
|
|
{
|
|
"label": "gpt-4-32k-0314",
|
|
"name": "gpt-4-32k-0314"
|
|
},
|
|
{
|
|
"label": "gpt-3.5-turbo",
|
|
"name": "gpt-3.5-turbo"
|
|
},
|
|
{
|
|
"label": "gpt-3.5-turbo-0301",
|
|
"name": "gpt-3.5-turbo-0301"
|
|
}
|
|
],
|
|
"default": "gpt-3.5-turbo",
|
|
"optional": true,
|
|
"id": "chatOpenAI_0-input-modelName-options"
|
|
},
|
|
{
|
|
"label": "Temperature",
|
|
"name": "temperature",
|
|
"type": "number",
|
|
"default": 0.9,
|
|
"optional": true,
|
|
"id": "chatOpenAI_0-input-temperature-number"
|
|
},
|
|
{
|
|
"label": "Max Tokens",
|
|
"name": "maxTokens",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-maxTokens-number"
|
|
},
|
|
{
|
|
"label": "Top Probability",
|
|
"name": "topP",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-topP-number"
|
|
},
|
|
{
|
|
"label": "Frequency Penalty",
|
|
"name": "frequencyPenalty",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-frequencyPenalty-number"
|
|
},
|
|
{
|
|
"label": "Presence Penalty",
|
|
"name": "presencePenalty",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-presencePenalty-number"
|
|
},
|
|
{
|
|
"label": "Timeout",
|
|
"name": "timeout",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-timeout-number"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"modelName": "gpt-3.5-turbo",
|
|
"temperature": "0.5",
|
|
"maxTokens": "",
|
|
"topP": "",
|
|
"frequencyPenalty": "",
|
|
"presencePenalty": "",
|
|
"timeout": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
|
|
"name": "chatOpenAI",
|
|
"label": "ChatOpenAI",
|
|
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | BaseLangChain"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 1271.1300438358664,
|
|
"y": -169.75707425097968
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 280,
|
|
"id": "conversationalRetrievalQAChain_0",
|
|
"position": {
|
|
"x": 1653.6177539108153,
|
|
"y": 266.4856653480158
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "conversationalRetrievalQAChain_0",
|
|
"label": "Conversational Retrieval QA Chain",
|
|
"name": "conversationalRetrievalQAChain",
|
|
"type": "ConversationalRetrievalQAChain",
|
|
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
|
|
"category": "Chains",
|
|
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
|
|
"inputParams": [],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Language Model",
|
|
"name": "model",
|
|
"type": "BaseLanguageModel",
|
|
"id": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel"
|
|
},
|
|
{
|
|
"label": "Vector Store Retriever",
|
|
"name": "vectorStoreRetriever",
|
|
"type": "BaseRetriever",
|
|
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"model": "{{chatOpenAI_0.data.instance}}",
|
|
"vectorStoreRetriever": "{{pineconeUpsert_1.data.instance}}"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|BaseLangChain",
|
|
"name": "conversationalRetrievalQAChain",
|
|
"label": "ConversationalRetrievalQAChain",
|
|
"type": "ConversationalRetrievalQAChain | BaseChain | BaseLangChain"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 1653.6177539108153,
|
|
"y": 266.4856653480158
|
|
},
|
|
"dragging": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"source": "github_1",
|
|
"sourceHandle": "github_1-output-github-Document",
|
|
"target": "pineconeUpsert_1",
|
|
"targetHandle": "pineconeUpsert_1-input-document-Document",
|
|
"type": "buttonedge",
|
|
"id": "github_1-github_1-output-github-Document-pineconeUpsert_1-pineconeUpsert_1-input-document-Document",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "openAIEmbeddings_1",
|
|
"sourceHandle": "openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
|
"target": "pineconeUpsert_1",
|
|
"targetHandle": "pineconeUpsert_1-input-embeddings-Embeddings",
|
|
"type": "buttonedge",
|
|
"id": "openAIEmbeddings_1-openAIEmbeddings_1-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pineconeUpsert_1-pineconeUpsert_1-input-embeddings-Embeddings",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "recursiveCharacterTextSplitter_1",
|
|
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
|
|
"target": "github_1",
|
|
"targetHandle": "github_1-input-textSplitter-TextSplitter",
|
|
"type": "buttonedge",
|
|
"id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-github_1-github_1-input-textSplitter-TextSplitter",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "chatOpenAI_0",
|
|
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain",
|
|
"target": "conversationalRetrievalQAChain_0",
|
|
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
|
"type": "buttonedge",
|
|
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "pineconeUpsert_1",
|
|
"sourceHandle": "pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
|
|
"target": "conversationalRetrievalQAChain_0",
|
|
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
|
"type": "buttonedge",
|
|
"id": "pineconeUpsert_1-pineconeUpsert_1-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
}
|
|
]
|
|
}
|