const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
const response = await openai.createCompletion("text-davinci-001", {
prompt: "List a single word that links the other three words together.\\n\\nThree words: sandwich, house, golf\\nWord: club\\nThree words: cream, skate, water\\nWord: ice\\nThree words: duck, fold, dollar\\nWord:",
temperature: 0.7,
max_tokens: 64,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
});
Tried:
Used here: https://www.remote-associates-test.com/