{
    "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,
            "height": 278,
            "id": "aiPlugin_0",
            "position": {
                "x": 1086.2925487205378,
                "y": 84.92168014974317
            },
            "type": "customNode",
            "data": {
                "id": "aiPlugin_0",
                "label": "AI Plugin",
                "name": "aiPlugin",
                "version": 1,
                "type": "AIPlugin",
                "baseClasses": ["AIPlugin", "Tool"],
                "category": "Tools",
                "description": "Execute actions using ChatGPT Plugin Url",
                "inputParams": [
                    {
                        "label": "Plugin Url",
                        "name": "pluginUrl",
                        "type": "string",
                        "placeholder": "https://www.klarna.com/.well-known/ai-plugin.json"
                    }
                ],
                "inputAnchors": [],
                "inputs": {
                    "pluginUrl": "https://www.klarna.com/.well-known/ai-plugin.json"
                },
                "outputAnchors": [
                    {
                        "id": "aiPlugin_0-output-aiPlugin-AIPlugin|Tool",
                        "name": "aiPlugin",
                        "label": "AIPlugin",
                        "type": "AIPlugin | Tool"
                    }
                ],
                "selected": false
            },
            "selected": false,
            "positionAbsolute": {
                "x": 1086.2925487205378,
                "y": 84.92168014974317
            },
            "dragging": false
        },
        {
            "width": 300,
            "height": 251,
            "id": "requestsGet_0",
            "position": {
                "x": 761.713884489628,
                "y": 170.84830553778124
            },
            "type": "customNode",
            "data": {
                "id": "requestsGet_0",
                "label": "Requests Get",
                "name": "requestsGet",
                "version": 1,
                "type": "RequestsGet",
                "baseClasses": ["RequestsGet", "Tool", "StructuredTool", "BaseLangChain"],
                "category": "Tools",
                "description": "Execute HTTP GET requests",
                "inputParams": [
                    {
                        "label": "URL",
                        "name": "url",
                        "type": "string",
                        "description": "Agent will make call to this exact URL. If not specified, agent will try to figure out itself from AIPlugin if provided",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsGet_0-input-url-string"
                    },
                    {
                        "label": "Description",
                        "name": "description",
                        "type": "string",
                        "rows": 4,
                        "default": "A portal to the internet. Use this when you need to get specific content from a website. \nInput should be a  url (i.e. https://www.google.com). The output will be the text response of the GET request.",
                        "description": "Acts like a prompt to tell agent when it should use this tool",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsGet_0-input-description-string"
                    },
                    {
                        "label": "Headers",
                        "name": "headers",
                        "type": "json",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsGet_0-input-headers-json"
                    }
                ],
                "inputAnchors": [],
                "inputs": {
                    "url": "",
                    "description": "A portal to the internet. Use this when you need to get specific content from a website. \nInput should be a  url (i.e. https://www.google.com). The output will be the text response of the GET request.",
                    "headers": ""
                },
                "outputAnchors": [
                    {
                        "id": "requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain",
                        "name": "requestsGet",
                        "label": "RequestsGet",
                        "type": "RequestsGet | Tool | StructuredTool | BaseLangChain"
                    }
                ],
                "outputs": {},
                "selected": false
            },
            "selected": false,
            "positionAbsolute": {
                "x": 761.713884489628,
                "y": 170.84830553778124
            },
            "dragging": false
        },
        {
            "width": 300,
            "height": 251,
            "id": "requestsPost_0",
            "position": {
                "x": 436.4125209312256,
                "y": 306.87715502984184
            },
            "type": "customNode",
            "data": {
                "id": "requestsPost_0",
                "label": "Requests Post",
                "name": "requestsPost",
                "version": 1,
                "type": "RequestsPost",
                "baseClasses": ["RequestsPost", "Tool", "StructuredTool", "BaseLangChain"],
                "category": "Tools",
                "description": "Execute HTTP POST requests",
                "inputParams": [
                    {
                        "label": "URL",
                        "name": "url",
                        "type": "string",
                        "description": "Agent will make call to this exact URL. If not specified, agent will try to figure out itself from AIPlugin if provided",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsPost_0-input-url-string"
                    },
                    {
                        "label": "Body",
                        "name": "body",
                        "type": "json",
                        "description": "JSON body for the POST request. If not specified, agent will try to figure out itself from AIPlugin if provided",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsPost_0-input-body-json"
                    },
                    {
                        "label": "Description",
                        "name": "description",
                        "type": "string",
                        "rows": 4,
                        "default": "Use this when you want to POST to a website.\nInput should be a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \nkey-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string\nThe output will be the text response of the POST request.",
                        "description": "Acts like a prompt to tell agent when it should use this tool",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsPost_0-input-description-string"
                    },
                    {
                        "label": "Headers",
                        "name": "headers",
                        "type": "json",
                        "additionalParams": true,
                        "optional": true,
                        "id": "requestsPost_0-input-headers-json"
                    }
                ],
                "inputAnchors": [],
                "inputs": {
                    "url": "",
                    "body": "",
                    "description": "Use this when you want to POST to a website.\nInput should be a json string with two keys: \"url\" and \"data\".\nThe value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \nkey-value pairs you want to POST to the url as a JSON body.\nBe careful to always use double quotes for strings in the json string\nThe output will be the text response of the POST request.",
                    "headers": ""
                },
                "outputAnchors": [
                    {
                        "id": "requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain",
                        "name": "requestsPost",
                        "label": "RequestsPost",
                        "type": "RequestsPost | Tool | StructuredTool | BaseLangChain"
                    }
                ],
                "outputs": {},
                "selected": false
            },
            "selected": false,
            "positionAbsolute": {
                "x": 436.4125209312256,
                "y": 306.87715502984184
            },
            "dragging": false
        },
        {
            "width": 300,
            "height": 523,
            "id": "chatOpenAI_0",
            "position": {
                "x": 802.0103755177098,
                "y": 576.0760341170851
            },
            "type": "customNode",
            "data": {
                "id": "chatOpenAI_0",
                "label": "ChatOpenAI",
                "name": "chatOpenAI",
                "version": 5,
                "type": "ChatOpenAI",
                "baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
                "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-1106-vision-preview",
                                "name": "gpt-4-1106-vision-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",
                        "default": 0.9,
                        "optional": true,
                        "id": "chatOpenAI_0-input-temperature-number"
                    },
                    {
                        "label": "Max Tokens",
                        "name": "maxTokens",
                        "type": "number",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-maxTokens-number"
                    },
                    {
                        "label": "Top Probability",
                        "name": "topP",
                        "type": "number",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-topP-number"
                    },
                    {
                        "label": "Frequency Penalty",
                        "name": "frequencyPenalty",
                        "type": "number",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-frequencyPenalty-number"
                    },
                    {
                        "label": "Presence Penalty",
                        "name": "presencePenalty",
                        "type": "number",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-presencePenalty-number"
                    },
                    {
                        "label": "Timeout",
                        "name": "timeout",
                        "type": "number",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-timeout-number"
                    },
                    {
                        "label": "BasePath",
                        "name": "basepath",
                        "type": "string",
                        "optional": true,
                        "additionalParams": true,
                        "id": "chatOpenAI_0-input-basepath-string"
                    },
                    {
                        "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": {
                    "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",
                        "name": "chatOpenAI",
                        "label": "ChatOpenAI",
                        "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
                    }
                ],
                "outputs": {},
                "selected": false
            },
            "selected": false,
            "positionAbsolute": {
                "x": 802.0103755177098,
                "y": 576.0760341170851
            },
            "dragging": false
        },
        {
            "width": 300,
            "height": 280,
            "id": "mrklAgentChat_0",
            "position": {
                "x": 1425.5853300862047,
                "y": 441.06218012993924
            },
            "type": "customNode",
            "data": {
                "id": "mrklAgentChat_0",
                "label": "MRKL Agent for Chat Models",
                "name": "mrklAgentChat",
                "version": 1,
                "type": "AgentExecutor",
                "baseClasses": ["AgentExecutor", "BaseChain"],
                "category": "Agents",
                "description": "Agent that uses the ReAct Framework to decide what action to take, optimized to be used with Chat Models",
                "inputParams": [],
                "inputAnchors": [
                    {
                        "label": "Allowed Tools",
                        "name": "tools",
                        "type": "Tool",
                        "list": true,
                        "id": "mrklAgentChat_0-input-tools-Tool"
                    },
                    {
                        "label": "Language Model",
                        "name": "model",
                        "type": "BaseLanguageModel",
                        "id": "mrklAgentChat_0-input-model-BaseLanguageModel"
                    }
                ],
                "inputs": {
                    "tools": ["{{requestsGet_0.data.instance}}", "{{requestsPost_0.data.instance}}", "{{aiPlugin_0.data.instance}}"],
                    "model": "{{chatOpenAI_0.data.instance}}"
                },
                "outputAnchors": [
                    {
                        "id": "mrklAgentChat_0-output-mrklAgentChat-AgentExecutor|BaseChain",
                        "name": "mrklAgentChat",
                        "label": "AgentExecutor",
                        "type": "AgentExecutor | BaseChain"
                    }
                ],
                "outputs": {},
                "selected": false
            },
            "selected": false,
            "positionAbsolute": {
                "x": 1425.5853300862047,
                "y": 441.06218012993924
            },
            "dragging": false
        }
    ],
    "edges": [
        {
            "source": "aiPlugin_0",
            "sourceHandle": "aiPlugin_0-output-aiPlugin-AIPlugin|Tool",
            "target": "mrklAgentChat_0",
            "targetHandle": "mrklAgentChat_0-input-tools-Tool",
            "type": "buttonedge",
            "id": "aiPlugin_0-aiPlugin_0-output-aiPlugin-AIPlugin|Tool-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
            "data": {
                "label": ""
            }
        },
        {
            "source": "requestsGet_0",
            "sourceHandle": "requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain",
            "target": "mrklAgentChat_0",
            "targetHandle": "mrklAgentChat_0-input-tools-Tool",
            "type": "buttonedge",
            "id": "requestsGet_0-requestsGet_0-output-requestsGet-RequestsGet|Tool|StructuredTool|BaseLangChain-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
            "data": {
                "label": ""
            }
        },
        {
            "source": "requestsPost_0",
            "sourceHandle": "requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain",
            "target": "mrklAgentChat_0",
            "targetHandle": "mrklAgentChat_0-input-tools-Tool",
            "type": "buttonedge",
            "id": "requestsPost_0-requestsPost_0-output-requestsPost-RequestsPost|Tool|StructuredTool|BaseLangChain-mrklAgentChat_0-mrklAgentChat_0-input-tools-Tool",
            "data": {
                "label": ""
            }
        },
        {
            "source": "chatOpenAI_0",
            "sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
            "target": "mrklAgentChat_0",
            "targetHandle": "mrklAgentChat_0-input-model-BaseLanguageModel",
            "type": "buttonedge",
            "id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-mrklAgentChat_0-mrklAgentChat_0-input-model-BaseLanguageModel",
            "data": {
                "label": ""
            }
        }
    ]
}
