import { Configuration, OpenAIApi } from 'openai'; import dotenv from 'dotenv'; import { gptGetEmoji } from './helpers.js'; dotenv.config(); const { OPEN_AI_API_KEY } = process.env; const configuration = new Configuration({ apiKey: OPEN_AI_API_KEY, }); const openai = new OpenAIApi(configuration); // source: https://en.wikipedia.org/wiki/Star_Wars const text = ` The Star Wars franchise depicts the adventures of characters "A long time ago in a galaxy far, far away",[5] in which humans and many species of aliens (often humanoid) co-exist with robots (typically referred to in the films as 'droids'), who may assist them in their daily routines; space travel between planets is common due to lightspeed hyperspace technology.[6][7][8] The planets range from wealthy, planet-wide cities to deserts scarcely populated by primitive tribes. Virtually any Earth biome, along with many fictional ones, has its counterpart as a Star Wars planet which, in most cases, teem with sentient and non-sentient alien life.[9] The franchise also makes use of other astronomical objects such as asteroid fields and nebulae.[10][11] Spacecraft range from small starfighters, to huge capital ships such as the Star Destroyers, to space stations such as the moon-sized Death Stars. Telecommunication includes two-way audio and audiovisual screens, holographic projections, and HoloNet (internet counterpart). `; const emojis = await gptGetEmoji({ textToAnalyze: text.trim(), openAiClient: openai, }); console.log(emojis);