Issue Description:
I'm encountering an issue with my Discord bot that uses the OpenAI library. The code is designed to facilitate a text-based adventure, and it includes the OpenAI API for generating responses. The issue I'm facing is with the 'openai.ChatCompletion.create' function, which is giving me the following error:
Code and Dependencies:
I'm using Discord.js v13 with the 'openai' library for text-based adventures. Here's a snippet of the code:
Code and Dependencies:
Here's the relevant part of my code:
const openai = require('openai');
openai.apiKey = 'my key & it works, im sure';
// ...
const response = await openai.ChatCompletion.create({
model: "gpt-3.5-turbo",
messages: messages,
temperature: 0.7,
max_tokens: 150,
});
I have openai and discord.js packages installed.