DEV Community

Bhagvan Kommadi
Bhagvan Kommadi

Posted on

6 1

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);
```

`


**Looks like OpenAI Codex did not understand the instruction right.**



`/* say hello */`

`

```
var hello = document.createElement('div');
hello.innerHTML = 'Hello';
document.body.appendChild(hello);
```

`

**say hello came out right**

`/* calculate 3*4 */`
`

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

```

`

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


Enter fullscreen mode Exit fullscreen mode

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay