Having trouble getting gpt3-turbo to work with my Express Server and application

So I am having some trouble with my Express Server that my Application uses to make API Calls to OpenAI’s API Layer. My Application functions as expected when selecting any language model from the dropdown except for gpt-3.5-turbo and gpt-3.5-turbo-0301 for some reason. When using gpt-3.5 it just keeps timing out and throwing a 504 Error Code. I will include the code to my Express Server below.

Blockquote
const { Configuration, OpenAIApi } = require(“openai”);
const express = require(‘express’);
const cors = require(‘cors’);
const bodyParser = require(‘body-parser’);
const configuration = new Configuration({
organization: “org-0F6o9szdOUq0j4WdPcExdfVC”,
apiKey: “■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■SPQ1uMMa”,
});

const openai = new OpenAIApi(configuration);

// create a simple express api that calls the function above

const app = express();

app.use(cors());
app.use(bodyParser.json());

app.use(express.json());
const port = 3080;

app.post(‘/app’, async (req, res) => {

const { message, currentModel, temperature } = req.body;

const response = await openai.createCompletion({
    model: `${currentModel}`,
    prompt: `${message}?`,
    max_tokens: 100,
    temperature: parseFloat(temperature),

  });

  console.log(response);
  console.log(response.data);

    res.json({
        message: response.data.choices[0].text,
    })

});

app.get(‘/models’, async (_req, res) => {

const response = await openai.listEngines();
console.log(response.data)
res.json({
    models: response.data
})

});

const server = app.listen(port, () => {
console.log(Example app listening at https://samuelmoore:${port})
});

process.on(“SIGINT”, () => {
console.log(“Received SIGINT. Closing server.”);
server.close(() => {
console.log(“Server closed.”);
process.exit(0);
});
});

process.on(“SIGTERM”, () => {
console.log(“Received SIGTERM. Closing server.”);
server.close(() => {
console.log(“Server closed.”);
process.exit(0);
});
});

process.on(“SIGABRT”, () => {
console.log(“Received SIGABRT. Closing server.”);
server.close(() => {
console.log(“Server closed.”);
process.exit(0);
});
});