654 lines
27 KiB
JSON
654 lines
27 KiB
JSON
{
|
|
"description": "Agent optimized for vector retrieval during conversation and answering questions based on previous dialogue.",
|
|
"badge": "POPULAR",
|
|
"nodes": [
|
|
{
|
|
"width": 300,
|
|
"height": 329,
|
|
"id": "openAIEmbeddings_0",
|
|
"position": {
|
|
"x": 954.0674802999345,
|
|
"y": -196.7034956445692
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "openAIEmbeddings_0",
|
|
"label": "OpenAI Embeddings",
|
|
"version": 1,
|
|
"name": "openAIEmbeddings",
|
|
"type": "OpenAIEmbeddings",
|
|
"baseClasses": ["OpenAIEmbeddings", "Embeddings"],
|
|
"category": "Embeddings",
|
|
"description": "OpenAI API to generate embeddings for a given text",
|
|
"inputParams": [
|
|
{
|
|
"label": "Connect Credential",
|
|
"name": "credential",
|
|
"type": "credential",
|
|
"credentialNames": ["openAIApi"],
|
|
"id": "openAIEmbeddings_0-input-credential-credential"
|
|
},
|
|
{
|
|
"label": "Strip New Lines",
|
|
"name": "stripNewLines",
|
|
"type": "boolean",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_0-input-stripNewLines-boolean"
|
|
},
|
|
{
|
|
"label": "Batch Size",
|
|
"name": "batchSize",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_0-input-batchSize-number"
|
|
},
|
|
{
|
|
"label": "Timeout",
|
|
"name": "timeout",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_0-input-timeout-number"
|
|
},
|
|
{
|
|
"label": "BasePath",
|
|
"name": "basepath",
|
|
"type": "string",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_0-input-basepath-string"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"stripNewLines": "",
|
|
"batchSize": "",
|
|
"timeout": "",
|
|
"basepath": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
|
"name": "openAIEmbeddings",
|
|
"label": "OpenAIEmbeddings",
|
|
"type": "OpenAIEmbeddings | Embeddings"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 954.0674802999345,
|
|
"y": -196.7034956445692
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 383,
|
|
"id": "conversationalRetrievalAgent_0",
|
|
"position": {
|
|
"x": 2345.912948267881,
|
|
"y": 357.97363342258217
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "conversationalRetrievalAgent_0",
|
|
"label": "Conversational Retrieval Agent",
|
|
"version": 2,
|
|
"name": "conversationalRetrievalAgent",
|
|
"type": "AgentExecutor",
|
|
"baseClasses": ["AgentExecutor", "BaseChain", "Runnable"],
|
|
"category": "Agents",
|
|
"description": "An agent optimized for retrieval during conversation, answering questions based on past dialogue, all using OpenAI's Function Calling",
|
|
"inputParams": [
|
|
{
|
|
"label": "System Message",
|
|
"name": "systemMessage",
|
|
"type": "string",
|
|
"rows": 4,
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "conversationalRetrievalAgent_0-input-systemMessage-string"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Allowed Tools",
|
|
"name": "tools",
|
|
"type": "Tool",
|
|
"list": true,
|
|
"id": "conversationalRetrievalAgent_0-input-tools-Tool"
|
|
},
|
|
{
|
|
"label": "Memory",
|
|
"name": "memory",
|
|
"type": "BaseChatMemory",
|
|
"id": "conversationalRetrievalAgent_0-input-memory-BaseChatMemory"
|
|
},
|
|
{
|
|
"label": "OpenAI/Azure Chat Model",
|
|
"name": "model",
|
|
"type": "ChatOpenAI | AzureChatOpenAI",
|
|
"id": "conversationalRetrievalAgent_0-input-model-ChatOpenAI | AzureChatOpenAI"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"tools": ["{{retrieverTool_0.data.instance}}"],
|
|
"memory": "{{bufferMemory_0.data.instance}}",
|
|
"model": "{{chatOpenAI_0.data.instance}}",
|
|
"systemMessage": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "conversationalRetrievalAgent_0-output-conversationalRetrievalAgent-AgentExecutor|BaseChain|Runnable",
|
|
"name": "conversationalRetrievalAgent",
|
|
"label": "AgentExecutor",
|
|
"type": "AgentExecutor | BaseChain | Runnable"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 2345.912948267881,
|
|
"y": 357.97363342258217
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 505,
|
|
"id": "retrieverTool_0",
|
|
"position": {
|
|
"x": 1770.1485365275375,
|
|
"y": -321.14473253480946
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "retrieverTool_0",
|
|
"label": "Retriever Tool",
|
|
"version": 1,
|
|
"name": "retrieverTool",
|
|
"type": "RetrieverTool",
|
|
"baseClasses": ["RetrieverTool", "DynamicTool", "Tool", "StructuredTool", "Runnable"],
|
|
"category": "Tools",
|
|
"description": "Use a retriever as allowed tool for agent",
|
|
"inputParams": [
|
|
{
|
|
"label": "Retriever Name",
|
|
"name": "name",
|
|
"type": "string",
|
|
"placeholder": "search_state_of_union",
|
|
"id": "retrieverTool_0-input-name-string"
|
|
},
|
|
{
|
|
"label": "Retriever Description",
|
|
"name": "description",
|
|
"type": "string",
|
|
"description": "When should agent uses to retrieve documents",
|
|
"rows": 3,
|
|
"placeholder": "Searches and returns documents regarding the state-of-the-union.",
|
|
"id": "retrieverTool_0-input-description-string"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Retriever",
|
|
"name": "retriever",
|
|
"type": "BaseRetriever",
|
|
"id": "retrieverTool_0-input-retriever-BaseRetriever"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"name": "search_website",
|
|
"description": "Searches and return documents regarding Jane - a culinary institution that offers top quality coffee, pastries, breakfast, lunch, and a variety of baked goods. They have multiple locations, including Jane on Fillmore, Jane on Larkin, Jane the Bakery, Toy Boat By Jane, and Little Jane on Grant. They emphasize healthy eating with a focus on flavor and quality ingredients. They bake everything in-house and work with local suppliers to source ingredients directly from farmers. They also offer catering services and delivery options.",
|
|
"retriever": "{{pinecone_0.data.instance}}"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "retrieverTool_0-output-retrieverTool-RetrieverTool|DynamicTool|Tool|StructuredTool|Runnable",
|
|
"name": "retrieverTool",
|
|
"label": "RetrieverTool",
|
|
"type": "RetrieverTool | DynamicTool | Tool | StructuredTool | Runnable"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"dragging": false,
|
|
"positionAbsolute": {
|
|
"x": 1770.1485365275375,
|
|
"y": -321.14473253480946
|
|
}
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 376,
|
|
"id": "bufferMemory_0",
|
|
"position": {
|
|
"x": 1771.396291209036,
|
|
"y": 216.94151328212496
|
|
},
|
|
"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": 1771.396291209036,
|
|
"y": 216.94151328212496
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 555,
|
|
"id": "pinecone_0",
|
|
"position": {
|
|
"x": 1376.1277183738853,
|
|
"y": -366.1202264629863
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "pinecone_0",
|
|
"label": "Pinecone",
|
|
"version": 1,
|
|
"name": "pinecone",
|
|
"type": "Pinecone",
|
|
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
|
|
"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": "pinecone_0-input-credential-credential"
|
|
},
|
|
{
|
|
"label": "Pinecone Index",
|
|
"name": "pineconeIndex",
|
|
"type": "string",
|
|
"id": "pinecone_0-input-pineconeIndex-string"
|
|
},
|
|
{
|
|
"label": "Pinecone Namespace",
|
|
"name": "pineconeNamespace",
|
|
"type": "string",
|
|
"placeholder": "my-first-namespace",
|
|
"additionalParams": true,
|
|
"optional": true,
|
|
"id": "pinecone_0-input-pineconeNamespace-string"
|
|
},
|
|
{
|
|
"label": "Pinecone Metadata Filter",
|
|
"name": "pineconeMetadataFilter",
|
|
"type": "json",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "pinecone_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": "pinecone_0-input-topK-number"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Document",
|
|
"name": "document",
|
|
"type": "Document",
|
|
"list": true,
|
|
"optional": true,
|
|
"id": "pinecone_0-input-document-Document"
|
|
},
|
|
{
|
|
"label": "Embeddings",
|
|
"name": "embeddings",
|
|
"type": "Embeddings",
|
|
"id": "pinecone_0-input-embeddings-Embeddings"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"document": "",
|
|
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
|
|
"pineconeIndex": "",
|
|
"pineconeNamespace": "",
|
|
"pineconeMetadataFilter": "",
|
|
"topK": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"name": "output",
|
|
"label": "Output",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"id": "pinecone_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
|
|
"name": "retriever",
|
|
"label": "Pinecone Retriever",
|
|
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
|
|
},
|
|
{
|
|
"id": "pinecone_0-output-vectorStore-Pinecone|VectorStore",
|
|
"name": "vectorStore",
|
|
"label": "Pinecone Vector Store",
|
|
"type": "Pinecone | VectorStore"
|
|
}
|
|
],
|
|
"default": "retriever"
|
|
}
|
|
],
|
|
"outputs": {
|
|
"output": "retriever"
|
|
},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 1376.1277183738853,
|
|
"y": -366.1202264629863
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 574,
|
|
"id": "chatOpenAI_0",
|
|
"position": {
|
|
"x": 1379.1468417698134,
|
|
"y": 220.8323181063672
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "chatOpenAI_0",
|
|
"label": "ChatOpenAI",
|
|
"version": 2,
|
|
"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-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_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": "gpt-3.5-turbo-16k",
|
|
"temperature": 0.9,
|
|
"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": 1379.1468417698134,
|
|
"y": 220.8323181063672
|
|
},
|
|
"dragging": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"source": "retrieverTool_0",
|
|
"sourceHandle": "retrieverTool_0-output-retrieverTool-RetrieverTool|DynamicTool|Tool|StructuredTool|Runnable",
|
|
"target": "conversationalRetrievalAgent_0",
|
|
"targetHandle": "conversationalRetrievalAgent_0-input-tools-Tool",
|
|
"type": "buttonedge",
|
|
"id": "retrieverTool_0-retrieverTool_0-output-retrieverTool-RetrieverTool|DynamicTool|Tool|StructuredTool|Runnable-conversationalRetrievalAgent_0-conversationalRetrievalAgent_0-input-tools-Tool",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "bufferMemory_0",
|
|
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
|
|
"target": "conversationalRetrievalAgent_0",
|
|
"targetHandle": "conversationalRetrievalAgent_0-input-memory-BaseChatMemory",
|
|
"type": "buttonedge",
|
|
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalRetrievalAgent_0-conversationalRetrievalAgent_0-input-memory-BaseChatMemory",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "openAIEmbeddings_0",
|
|
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
|
"target": "pinecone_0",
|
|
"targetHandle": "pinecone_0-input-embeddings-Embeddings",
|
|
"type": "buttonedge",
|
|
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-pinecone_0-pinecone_0-input-embeddings-Embeddings",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "pinecone_0",
|
|
"sourceHandle": "pinecone_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
|
|
"target": "retrieverTool_0",
|
|
"targetHandle": "retrieverTool_0-input-retriever-BaseRetriever",
|
|
"type": "buttonedge",
|
|
"id": "pinecone_0-pinecone_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever-retrieverTool_0-retrieverTool_0-input-retriever-BaseRetriever",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "chatOpenAI_0",
|
|
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
|
"target": "conversationalRetrievalAgent_0",
|
|
"targetHandle": "conversationalRetrievalAgent_0-input-model-ChatOpenAI",
|
|
"type": "buttonedge",
|
|
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalAgent_0-conversationalRetrievalAgent_0-input-model-ChatOpenAI",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
}
|
|
]
|
|
}
|