Hey there.
I am getting a 500 Error while trying to run a script. This is the part that I changed to the new model:
// Call OpenAI language model for each prompt chunk var description = ""; for (var j = 0; j < promptChunks.length; j++) { var options = { "method": "post", "headers": { "Content-Type": "application/json", "Authorization": "Bearer " + api_key, }, "payload": JSON.stringify({ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": promptChunks[j] + content.substring(0, 4000)}], "max_tokens": 2000, "temperature": 0.8, "stop": "\n", "n": 1 }), }; var response = UrlFetchApp.fetch("https://api.openai.com/v1/chat/completions", options); description += JSON.parse(response.getContentText()).choices[0].text.trim(); }
Error Message:
Exception: Request failed for https://api.openai.com returned code 500. Truncated server response: { "error": { "message": "The server had an error processing your request. Sorry about that! You can retry your request, or contact us through...