DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Bhagvan Kommadi
Bhagvan Kommadi

Posted on

Open AI Codex playground

started working on Open AI codex playground. https://beta.openai.com/codex-javascript-sandbox

The playground takes the instructions to create the javascript code. The comments are the instructions.

/* print a string open ai codex */

var aiCodex = document.createElement('div');
aiCodex.innerHTML = '<a href="https://openai.com/blog/openai-baselines-ppo/">OpenAI Baselines: Proximal Policy Optimization</a>';
document.body.appendChild(aiCodex);
Enter fullscreen mode Exit fullscreen mode


`

Looks like OpenAI Codex did not understand the instruction right.

/* say hello */

`

var hello = document.createElement('div');
hello.innerHTML = 'Hello';
document.body.appendChild(hello);
Enter fullscreen mode Exit fullscreen mode


`

say hello came out right

/* calculate 3*4 */
`

var threeTimesFour = document.createElement('div');
threeTimesFour.innerHTML = '3*4 = ' + (3*4);
document.body.appendChild(threeTimesFour);

Enter fullscreen mode Exit fullscreen mode


`

In the next post, we will look at complex examples.....

Top comments (0)

Why You Need to Study Javascript Fundamentals

The harsh reality for JS Developers: If you don't study the fundamentals, you'll be just another β€œCoder”. Top learnings on how to get to the mid/senior level faster as a JavaScript developer by Dragos Nedelcu.