Closed Beeloo0011 closed 1 year ago
const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); const openai = new OpenAIApi(configuration); const chat_completion = await openai.createChatCompletion({ model: "gpt-3.5-turbo", messages: [{ role: "user", content: "Hello world" }], });
const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); const openai = new OpenAIApi(configuration); const chat_completion = await openai.createChatCompletion({ model: "gpt-3.5-turbo", messages: [{ role: "user", content: "Hello world" }], });