Created
March 4, 2022 04:21
-
-
Save justaguywhocodes/434bbe17803602309e8a41dd6d9bf0fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "Product description: A home milkshake maker\nSeed words: fast, healthy, compact.\nProduct names: HomeShaker, Fit Shaker, QuickShake, Shake Maker\n\nProduct description: A pair of shoes that can fit any foot size.\nSeed words: adaptable, fit, omni-fit.", | |
temperature: 0.8, | |
max_tokens: 60, | |
top_p: 1.0, | |
frequency_penalty: 0.0, | |
presence_penalty: 0.0, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment