Do you have ingrediants but don't know what to cook? Just ask this bot! Give this bot the ingrediants using !recipe <ingrediants> and it will tell you what to cook and how to cook!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let content = context.params.event.content.split(' ').splice(1).join(' ');
let result = await lib.openai.playground['@0.0.4'].completions.create({
model: `text-davinci-003`,
prompt: [
`Write a recipe and instructions based on these ingrediets: ${content}`,
],
max_tokens: 1000,
temperature: 0.3,
top_p: 1,
best_of: 1,
});
await lib.discord.channels['@0.3.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Here is your recipe!`,
description: result.choices[0].text,
color: 0x00ffff,
},
],
});