# Bug: Chat Playground "get Python code": non-working schemas returned

**URL:** <https://community.openai.com/t/bug-chat-playground-get-python-code-non-working-schemas-returned/959200>\
**Category:** Bugs\
**Tags:** playground\
**Created:** [September 27, 2024, 6:44pm UTC](https://community.openai.com/t/bug-chat-playground-get-python-code-non-working-schemas-returned/959200 "2024-09-27T18:44:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [September 27, 2024, 6:44pm UTC](https://community.openai.com/t/bug-chat-playground-get-python-code-non-working-schemas-returned/959200/1 "2024-09-27T18:44:37Z")

</div>

Report:

When using the chat completions API playground on the platform site, the “get code” button provides Python code that does not have a Python data object for either `tools =` or for `response_format` - instead, JSON schema is directly placed in code.

Background:

You can now use a JSON schema you provide as function specification and as json\_object type response. The validator has a look and places this into the operation of the requests being made.

Problem:

- Lowercase true and false (of JSON), instead of uppercase `True` and `False` (for Python data), no conversion being performed.

That same schema is repeated back into code samples without the required modifications. It is not provided as a string, but as a dict as input OpenAI’s Python library.

Also buggy:

The JSON button on a message, and automatic JSON parsing and display of a response message, doesn’t care about where a response came from or how, it will try to convert anything, and then what was actually sent raw is completely lost from understanding.
