Codex JavaScript Sandbox vs Playground


How is Codex in the “JavaScript Sandbox” different from Codex in the “Playground”. Using the Javascript Sandbox, the code generated looks more complete and accurate, the playground seems to be more random. Is there a difference between this two? How does the Javascript Sandbox determine/set the temperature and response length?



Hi Ravin,

great question. The main difference I can imagine to start with is the playground version can support multiple languages (including Python). I believe the javascript one is restricted in that way.

if you’re interested in configuration settings, you can take a look at the javascript sandbox’s network requests (by pressing F12 to see your browser’s Developer tools) and see what it is sending over in terms of temperature/response length:

The entire payload is:

    "prompt": "<|endoftext|>/* I start with a blank HTML page, and incrementally modify it via <script> injection. Written for Chrome. */\n/* Command: Add \"Hello World\", by adding an HTML DOM node */\nvar helloWorld = document.createElement('div');\nhelloWorld.innerHTML = 'Hello World';\ndocument.body.appendChild(helloWorld);\n/* Command: Clear the page. */\nwhile (document.body.firstChild) {\n  document.body.removeChild(document.body.firstChild);\n}\n\n/* Command: a red circle in the middle of the screen */\n",
    "stream": true,
    "max_tokens": 1000,
    "temperature": 0,
    "stop": "/* Command:"

hope this helps, have fun!


Hi @bakztfuture

Thank you for sharing your finding!


1 Like