June 20, 2023, 3:07 p.m. | Alexey Kramin

DEV Community dev.to

I've been implemented a JavaScript AI emoji generator recently. And as OpenAI API responses are not always consistent, or maybe my prompts are far from ideal, I needed to create a backup function that generates random emojis if the response is not parsed properly.


Surprisingly, I found that functions might more look like an instruction for a person than for a machine in future 😅. Here is what I mean:



// regular JS function
function getNEmojis(n) { …

ai api backup consistent emoji found function functions generator javascript node openai openai api programming prompts random responses text

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US