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

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.

2 Likes