Perplexity Module Timing Out

I am trying to make a Chat Completion with Perplexity and it’s timing out. I’ve tried ignoring it with error handling. All that does is skip the module and try to finish the scenario, which is not what I want. I’ve tried downloading the .json and adding a 'timeout": “300” to the module, which also isn’t working. I’ve tried a sleep module, but it doesn’t help either.

The timeout is so fast that the AI doesn’t have time to complete. How can I force a module to take longer?

HERE IS THE BLUEPRINT:

{
    "name": "WRITING ARTICLES FROM LIST",
    "flow": [
        {
            "id": 1,
            "module": "builtin:BasicRouter",
            "version": 1,
            "mapper": null,
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                }
            },
            "routes": [
                {
                    "flow": [
                        {
                            "id": 2,
                            "module": "google-docs:getADocument",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 105910
                            },
                            "mapper": {
                                "select": "dropdown",
                                "filter": "image",
                                "destination": "drive",
                                "document": "/1BNxPnzxlRGf2x1Y4fUbhOBJEealEO58ed3O9dFOCWT0"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 300,
                                    "y": 0
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "My Google connection (sean@uniteideas.com)",
                                            "data": {
                                                "scoped": "true",
                                                "connection": "google"
                                            }
                                        }
                                    },
                                    "expect": {
                                        "select": {
                                            "label": "By Dropdown"
                                        },
                                        "filter": {
                                            "label": "Image"
                                        },
                                        "destination": {
                                            "label": "My Drive"
                                        },
                                        "document": {
                                            "path": [
                                                "Comprehensive Blog Post Plan for Church Construction and Design"
                                            ]
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:google",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "select",
                                        "type": "select",
                                        "label": "Get Content of a Document",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "map",
                                                "dropdown"
                                            ]
                                        }
                                    },
                                    {
                                        "name": "filter",
                                        "type": "select",
                                        "label": "Filter",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "image",
                                                "drawing",
                                                "chart"
                                            ]
                                        }
                                    },
                                    {
                                        "name": "destination",
                                        "type": "select",
                                        "label": "Choose a Drive",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "drive",
                                                "share",
                                                "team"
                                            ]
                                        }
                                    },
                                    {
                                        "name": "document",
                                        "type": "file",
                                        "label": "Document ID",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 4,
                            "module": "perplexity-ai:createAChatCompletion",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 37523
                            },
                            "mapper": {
                                "model": "llama-3.1-sonar-huge-128k-online",
                                "messages": [
                                    {
                                        "content": "You are a College Doctoral student who is the top internet researcher. You are determined and thorough. You know the best places to find all sorts of information.\n\nI am going to give you some text titled, 'Comprehensive Blog Post Plan for Church Construction and Design'\n\nThis text contains a list of articles and surounding topics that need to be researched before articles can be written. Some of the information in the document will be struck through. You are to ignore that part of the document. It has already been researched.\n\nThe document is formatted like this:\n\n```\n'Comprehensive Blog Post Plan for Church Construction and Design'\n\n1.[TITLE OF ARTICLE TO BE RESEARCHED]\n       Topic Group:[GENERAL OVERARCHING TOPIC WHICH THIS AND RELATED ARTICLES BELONG TO]\n       Related Articles:\n                  [ANOTHER RELATED ARTICLE TOPIC]\n                  [ANOTHER RELATED ARTICLE TOPIC]\n                 [SUBSIQUENT REPLATED ARTICLE TOPICS]\n\n2.[TITLE OF ARTICLE TO BE RESEARCHED]\n       Topic Group:[GENERAL OVERARCHING TOPIC WHICH THIS AND RELATED ARTICLES BELONG TO]\n       Related Articles:\n                  [ANOTHER RELATED ARTICLE TOPIC]\n                  [ANOTHER RELATED ARTICLE TOPIC]\n                 [SUBSIQUENT REPLATED ARTICLE TOPICS]\n```\nIn total there are 20 articles and topics and there are around 60 additional articles.\n\nYour job is to pick the first 'Article' and 'Topic Group' that are not struck out and look at the name of the article to be written and the ' Topic Group. it is associated with along with the 'Related Articles' and to think deeply and comprehensivly about how those articles relate to the topic and to research the first article in that 'Topic Group' that is not struck out.\n\nYou are not going to write the article, your job is to search online to find the most relevant, up-to-date, comprehensive information for the article, as it pertains to the overall topic and related articles.\n\nAs an expert at research you will provide a detailed analysis of the information you find online. You will create a comprehensive and detailed summary of the information you find. You will include all relevant information such as:\n\nTitles of the articles you find.\nSEO information about the articles such as, but not lilmited to, keywords, meta descriptions, tags, and categories of blog posts.\n\nHere is the text that contains the articles and topics:\n\n{{2.text}}",
                                        "role": "user"
                                    }
                                ],
                                "max_tokens": "5000",
                                "temperature": "1"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 0
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "Perplexity",
                                            "data": {
                                                "scoped": "true",
                                                "connection": "perplexity-ai"
                                            }
                                        }
                                    },
                                    "expect": {
                                        "model": {
                                            "mode": "edit"
                                        },
                                        "messages": {
                                            "mode": "chose",
                                            "items": [
                                                {
                                                    "role": {
                                                        "mode": "chose",
                                                        "label": "User"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:perplexity-ai",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "model",
                                        "type": "select",
                                        "label": "Model",
                                        "required": true
                                    },
                                    {
                                        "name": "messages",
                                        "type": "array",
                                        "label": "Messages",
                                        "required": true,
                                        "spec": [
                                            {
                                                "name": "content",
                                                "type": "text",
                                                "label": "Content",
                                                "required": true
                                            },
                                            {
                                                "name": "role",
                                                "type": "select",
                                                "label": "Role",
                                                "options": [
                                                    {
                                                        "label": "User",
                                                        "value": "user"
                                                    },
                                                    {
                                                        "label": "Assistant",
                                                        "value": "assistant"
                                                    },
                                                    {
                                                        "label": "System",
                                                        "value": "system"
                                                    }
                                                ],
                                                "required": true
                                            }
                                        ]
                                    },
                                    {
                                        "name": "max_tokens",
                                        "type": "number",
                                        "label": "Max Tokens"
                                    },
                                    {
                                        "name": "temperature",
                                        "type": "number",
                                        "label": "Temperature",
                                        "validate": {
                                            "max": 1.999,
                                            "min": 0
                                        }
                                    },
                                    {
                                        "name": "top_p",
                                        "type": "number",
                                        "label": "Top P",
                                        "validate": {
                                            "max": 1,
                                            "min": 0
                                        }
                                    },
                                    {
                                        "name": "top_k",
                                        "type": "number",
                                        "label": "Top K",
                                        "validate": {
                                            "max": 2048,
                                            "min": 0
                                        }
                                    },
                                    {
                                        "name": "presence_penalty",
                                        "type": "number",
                                        "label": "Presence Penalty",
                                        "validate": {
                                            "max": 2,
                                            "min": -2
                                        }
                                    },
                                    {
                                        "name": "frequency_penalty",
                                        "type": "number",
                                        "label": "Frequency Penalty",
                                        "validate": {
                                            "min": 0
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "id": 5,
                            "module": "google-docs:createADocument",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 105910
                            },
                            "mapper": {
                                "name": "{{2.title}}",
                                "content": "{{4.choices[].message.content}}",
                                "destination": "drive",
                                "header": false,
                                "footer": false,
                                "folderId": "/1rRPYqn_dStxLXmxZbeDXfbJjpQMmJhUS"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 900,
                                    "y": 0
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "My Google connection (sean@uniteideas.com)",
                                            "data": {
                                                "scoped": "true",
                                                "connection": "google"
                                            }
                                        }
                                    },
                                    "expect": {
                                        "destination": {
                                            "label": "My Drive"
                                        },
                                        "folderId": {
                                            "mode": "chose",
                                            "path": [
                                                "BLOG POST AUTOMATION"
                                            ]
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:google",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name",
                                        "required": true
                                    },
                                    {
                                        "name": "content",
                                        "type": "text",
                                        "label": "Content",
                                        "required": true
                                    },
                                    {
                                        "name": "destination",
                                        "type": "select",
                                        "label": "Choose a Drive",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "drive",
                                                "share",
                                                "team"
                                            ]
                                        }
                                    },
                                    {
                                        "name": "header",
                                        "type": "boolean",
                                        "label": "Insert a Header",
                                        "required": true
                                    },
                                    {
                                        "name": "footer",
                                        "type": "boolean",
                                        "label": "Insert a Footer",
                                        "required": true
                                    },
                                    {
                                        "name": "folderId",
                                        "type": "folder",
                                        "label": "New Document's Location",
                                        "required": true
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "us2.make.com"
    }
}```

Hej @Sean_Walker;

In reading your prompt, I feel that you’re asking for a lot to happen in a single instance. I would suggest breaking your prompt up into sections and then chain your Perplexity inquiries with the the prior feeding the following.

A benefit of this is that you can fine tune the results of each section and then run a closing Perplexity reflection prompt to improve the final result overall.

Lastly, you can use error handlers to attempt a second run of each Perplexity module to get a result to come through. Like above of on OpenAI module errors, sleep for 10 seconds, run a clone of the original module, and then resume with those results for them to go onto the next typical module.

In using the above technique and progressive fine tuning of prompts, we’ve gone from 10% acceptance of first-run content requests to over 90%.