Using OpenAI API with Node.js Crash Course | Adamu Muhammad Dankore

preview_player
Показать описание
#crashcourse #openai #ai

Here's what we cover in this video:

const { Configuration, OpenAIApi } = require('openai');
const config = new Configuration({
});
const openai = new OpenAIApi(config);

2. Creating Text Completions: We then move on to creating text completions using the OpenAI API. We use the `text-davinci-003` model to generate a short poem based on a given prompt.

async function createTextCompletion() {
model: 'text-davinci-003',
prompt: "Write a short poem about a rabbit who is celebrating his birthday.",
max_tokens: 100,
temperature: 0.2
});
}
createTextCompletion();

**Timestamps**:
0:00 - Introduction
0:14 - Setting up the OpenAI API
4:26 - Creating Text Completions
14:00 - Conclusion

Resources:

Don't forget to like, share, and subscribe for more tutorials like this one. If you have any questions or comments, feel free to leave them in the comments section below. Happy coding!

-------------------------------------------
Follow Adamu M. Dankore:
-------------------------------------------
Рекомендации по теме
join shbcf.ru