UNPKG

@ag076810/ai

Version:

Effortlessly integrate AI text and image models in your node applications

8 lines (7 loc) 264 B
const AI = require("../src/index.js"); (async function () { const stream = await AI("the color of the sky is", { model: "text-davinci-003", temperature: 0, stream: true }); for await (let color of stream) { process.stdout.write(color); } })();