624 lines
26 KiB
JSON
624 lines
26 KiB
JSON
{
|
|
"description": "Use BabyAGI to create tasks and reprioritize for a given objective",
|
|
"framework": ["Langchain"],
|
|
"usecases": ["Reflective Agent"],
|
|
"nodes": [
|
|
{
|
|
"width": 300,
|
|
"height": 431,
|
|
"id": "babyAGI_1",
|
|
"position": {
|
|
"x": 950.8042093214954,
|
|
"y": 66.00028106865324
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "babyAGI_1",
|
|
"label": "BabyAGI",
|
|
"version": 2,
|
|
"name": "babyAGI",
|
|
"type": "BabyAGI",
|
|
"baseClasses": ["BabyAGI"],
|
|
"category": "Agents",
|
|
"description": "Task Driven Autonomous Agent which creates new task and reprioritizes task list based on objective",
|
|
"inputParams": [
|
|
{
|
|
"label": "Task Loop",
|
|
"name": "taskLoop",
|
|
"type": "number",
|
|
"default": 3,
|
|
"id": "babyAGI_1-input-taskLoop-number"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Chat Model",
|
|
"name": "model",
|
|
"type": "BaseChatModel",
|
|
"id": "babyAGI_1-input-model-BaseChatModel"
|
|
},
|
|
{
|
|
"label": "Vector Store",
|
|
"name": "vectorStore",
|
|
"type": "VectorStore",
|
|
"id": "babyAGI_1-input-vectorStore-VectorStore"
|
|
},
|
|
{
|
|
"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": "babyAGI_1-input-inputModeration-Moderation"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"inputModeration": "",
|
|
"model": "{{chatOpenAI_0.data.instance}}",
|
|
"vectorStore": "{{pinecone_0.data.instance}}",
|
|
"taskLoop": 3
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "babyAGI_1-output-babyAGI-BabyAGI",
|
|
"name": "babyAGI",
|
|
"label": "BabyAGI",
|
|
"type": "BabyAGI"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"dragging": false,
|
|
"positionAbsolute": {
|
|
"x": 950.8042093214954,
|
|
"y": 66.00028106865324
|
|
}
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 424,
|
|
"id": "openAIEmbeddings_0",
|
|
"position": {
|
|
"x": -111.82510263637522,
|
|
"y": -224.88655030419665
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "openAIEmbeddings_0",
|
|
"label": "OpenAI Embeddings",
|
|
"version": 4,
|
|
"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": "Model Name",
|
|
"name": "modelName",
|
|
"type": "asyncOptions",
|
|
"loadMethod": "listModels",
|
|
"default": "text-embedding-ada-002",
|
|
"id": "openAIEmbeddings_0-input-modelName-asyncOptions"
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"label": "Dimensions",
|
|
"name": "dimensions",
|
|
"type": "number",
|
|
"optional": true,
|
|
"additionalParams": true,
|
|
"id": "openAIEmbeddings_0-input-dimensions-number"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"modelName": "text-embedding-ada-002",
|
|
"stripNewLines": "",
|
|
"batchSize": "",
|
|
"timeout": "",
|
|
"basepath": "",
|
|
"dimensions": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
|
"name": "openAIEmbeddings",
|
|
"label": "OpenAIEmbeddings",
|
|
"description": "OpenAI API to generate embeddings for a given text",
|
|
"type": "OpenAIEmbeddings | Embeddings"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": -111.82510263637522,
|
|
"y": -224.88655030419665
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 606,
|
|
"id": "pinecone_0",
|
|
"position": {
|
|
"x": 245.707825551803,
|
|
"y": -176.9243551667388
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "pinecone_0",
|
|
"label": "Pinecone",
|
|
"version": 3,
|
|
"name": "pinecone",
|
|
"type": "Pinecone",
|
|
"baseClasses": ["Pinecone", "VectorStoreRetriever", "BaseRetriever"],
|
|
"category": "Vector Stores",
|
|
"description": "Upsert embedded data and perform similarity or mmr search 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"
|
|
},
|
|
{
|
|
"label": "Search Type",
|
|
"name": "searchType",
|
|
"type": "options",
|
|
"default": "similarity",
|
|
"options": [
|
|
{
|
|
"label": "Similarity",
|
|
"name": "similarity"
|
|
},
|
|
{
|
|
"label": "Max Marginal Relevance",
|
|
"name": "mmr"
|
|
}
|
|
],
|
|
"additionalParams": true,
|
|
"optional": true,
|
|
"id": "pinecone_0-input-searchType-options"
|
|
},
|
|
{
|
|
"label": "Fetch K (for MMR Search)",
|
|
"name": "fetchK",
|
|
"description": "Number of initial documents to fetch for MMR reranking. Default to 20. Used only when the search type is MMR",
|
|
"placeholder": "20",
|
|
"type": "number",
|
|
"additionalParams": true,
|
|
"optional": true,
|
|
"id": "pinecone_0-input-fetchK-number"
|
|
},
|
|
{
|
|
"label": "Lambda (for MMR Search)",
|
|
"name": "lambda",
|
|
"description": "Number between 0 and 1 that determines the degree of diversity among the results, where 0 corresponds to maximum diversity and 1 to minimum diversity. Used only when the search type is MMR",
|
|
"placeholder": "0.5",
|
|
"type": "number",
|
|
"additionalParams": true,
|
|
"optional": true,
|
|
"id": "pinecone_0-input-lambda-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"
|
|
},
|
|
{
|
|
"label": "Record Manager",
|
|
"name": "recordManager",
|
|
"type": "RecordManager",
|
|
"description": "Keep track of the record to prevent duplication",
|
|
"optional": true,
|
|
"id": "pinecone_0-input-recordManager-RecordManager"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"document": "",
|
|
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
|
|
"recordManager": "",
|
|
"pineconeIndex": "",
|
|
"pineconeNamespace": "",
|
|
"pineconeMetadataFilter": "",
|
|
"topK": "",
|
|
"searchType": "similarity",
|
|
"fetchK": "",
|
|
"lambda": ""
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"name": "output",
|
|
"label": "Output",
|
|
"type": "options",
|
|
"description": "",
|
|
"options": [
|
|
{
|
|
"id": "pinecone_0-output-retriever-Pinecone|VectorStoreRetriever|BaseRetriever",
|
|
"name": "retriever",
|
|
"label": "Pinecone Retriever",
|
|
"description": "",
|
|
"type": "Pinecone | VectorStoreRetriever | BaseRetriever"
|
|
},
|
|
{
|
|
"id": "pinecone_0-output-vectorStore-Pinecone|VectorStore",
|
|
"name": "vectorStore",
|
|
"label": "Pinecone Vector Store",
|
|
"description": "",
|
|
"type": "Pinecone | VectorStore"
|
|
}
|
|
],
|
|
"default": "retriever"
|
|
}
|
|
],
|
|
"outputs": {
|
|
"output": "vectorStore"
|
|
},
|
|
"selected": false
|
|
},
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 245.707825551803,
|
|
"y": -176.9243551667388
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"width": 300,
|
|
"height": 670,
|
|
"id": "chatOpenAI_0",
|
|
"position": {
|
|
"x": 597.7565040390853,
|
|
"y": -381.01461408909825
|
|
},
|
|
"type": "customNode",
|
|
"data": {
|
|
"id": "chatOpenAI_0",
|
|
"label": "ChatOpenAI",
|
|
"version": 6,
|
|
"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": "asyncOptions",
|
|
"loadMethod": "listModels",
|
|
"default": "gpt-3.5-turbo",
|
|
"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"
|
|
},
|
|
{
|
|
"label": "Allow Image Uploads",
|
|
"name": "allowImageUploads",
|
|
"type": "boolean",
|
|
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
|
"default": false,
|
|
"optional": true,
|
|
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
|
},
|
|
{
|
|
"label": "Image Resolution",
|
|
"description": "This parameter controls the resolution in which the model views the image.",
|
|
"name": "imageResolution",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"label": "Low",
|
|
"name": "low"
|
|
},
|
|
{
|
|
"label": "High",
|
|
"name": "high"
|
|
},
|
|
{
|
|
"label": "Auto",
|
|
"name": "auto"
|
|
}
|
|
],
|
|
"default": "low",
|
|
"optional": false,
|
|
"additionalParams": true,
|
|
"id": "chatOpenAI_0-input-imageResolution-options"
|
|
}
|
|
],
|
|
"inputAnchors": [
|
|
{
|
|
"label": "Cache",
|
|
"name": "cache",
|
|
"type": "BaseCache",
|
|
"optional": true,
|
|
"id": "chatOpenAI_0-input-cache-BaseCache"
|
|
}
|
|
],
|
|
"inputs": {
|
|
"cache": "",
|
|
"modelName": "gpt-3.5-turbo",
|
|
"temperature": 0.9,
|
|
"maxTokens": "",
|
|
"topP": "",
|
|
"frequencyPenalty": "",
|
|
"presencePenalty": "",
|
|
"timeout": "",
|
|
"basepath": "",
|
|
"baseOptions": "",
|
|
"allowImageUploads": true,
|
|
"imageResolution": "low"
|
|
},
|
|
"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": 597.7565040390853,
|
|
"y": -381.01461408909825
|
|
},
|
|
"dragging": false
|
|
},
|
|
{
|
|
"id": "stickyNote_0",
|
|
"position": {
|
|
"x": 949.0763123880214,
|
|
"y": -172.0310628893923
|
|
},
|
|
"type": "stickyNote",
|
|
"data": {
|
|
"id": "stickyNote_0",
|
|
"label": "Sticky Note",
|
|
"version": 2,
|
|
"name": "stickyNote",
|
|
"type": "StickyNote",
|
|
"baseClasses": ["StickyNote"],
|
|
"tags": ["Utilities"],
|
|
"category": "Utilities",
|
|
"description": "Add a sticky note",
|
|
"inputParams": [
|
|
{
|
|
"label": "",
|
|
"name": "note",
|
|
"type": "string",
|
|
"rows": 1,
|
|
"placeholder": "Type something here",
|
|
"optional": true,
|
|
"id": "stickyNote_0-input-note-string"
|
|
}
|
|
],
|
|
"inputAnchors": [],
|
|
"inputs": {
|
|
"note": "BabyAGI is made up of 3 components:\n\n- A chain responsible for creating tasks\n- A chain responsible for prioritising tasks\n- A chain responsible for executing tasks\n\nThese chains are executed in sequence until the task list is empty or the maximum number of iterations is reached"
|
|
},
|
|
"outputAnchors": [
|
|
{
|
|
"id": "stickyNote_0-output-stickyNote-StickyNote",
|
|
"name": "stickyNote",
|
|
"label": "StickyNote",
|
|
"description": "Add a sticky note",
|
|
"type": "StickyNote"
|
|
}
|
|
],
|
|
"outputs": {},
|
|
"selected": false
|
|
},
|
|
"width": 300,
|
|
"height": 203,
|
|
"selected": false,
|
|
"positionAbsolute": {
|
|
"x": 949.0763123880214,
|
|
"y": -172.0310628893923
|
|
},
|
|
"dragging": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"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": "chatOpenAI_0",
|
|
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
|
"target": "babyAGI_1",
|
|
"targetHandle": "babyAGI_1-input-model-BaseChatModel",
|
|
"type": "buttonedge",
|
|
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-babyAGI_1-babyAGI_1-input-model-BaseChatModel",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
},
|
|
{
|
|
"source": "pinecone_0",
|
|
"sourceHandle": "pinecone_0-output-vectorStore-Pinecone|VectorStore",
|
|
"target": "babyAGI_1",
|
|
"targetHandle": "babyAGI_1-input-vectorStore-VectorStore",
|
|
"type": "buttonedge",
|
|
"id": "pinecone_0-pinecone_0-output-vectorStore-Pinecone|VectorStore-babyAGI_1-babyAGI_1-input-vectorStore-VectorStore",
|
|
"data": {
|
|
"label": ""
|
|
}
|
|
}
|
|
]
|
|
}
|