Task timed out after 10.01 seconds - openAI api

I am calling the openAI API using netlify’s serverless function, but I get a Task timed out after 10.01 seconds error. It worked fine locally before I moved to netlify to use the serverless function. Also I see I am getting charged for usage on openAI when I try it, so I know the call is being made to openAI, but seems the response takes too long?
I saw a different post saying to “close the connection” to solve this issue, so I tried adding openai.instanceAxios.defaults.adapter = null; to my finally block in the netlify function, but still get the timeout.

https://lore-ai.netlify.app/

Hi @cozy - welcome to our community! The default timeout for Netlify functions is 10 seconds. However, it is possible to increase the timeout up to 26 seconds but this is only available to customers on a Pro plan or above. (You can choose to upgrade to a Pro plan in our UI.)

Please note that increasing the function timeout may not always be the best solution, as there could be other factors affecting the performance of your functions.

Hope this helps.