#Bug Report – Invalid Characters in JSON Response (response_format: json)

1 messages · Page 1 of 1 (latest)

nova beaconBOT
#

Reported by @hearty charm

Bug Report: Bug Report – Invalid Characters in JSON Response (response_format: json)
`Steps to Reproduce`

Make a request to the Chat Completions endpoint using gpt-4o-2024-08-06.

Use the response_format: "json" option.

Provide the following system and user prompt:

[
{
"role": "system",
"content": "You are an assistant that processes addresses. Return a structured JSON with proper UTF-8 formatting. Always include accents correctly, e.g., 'São Paulo', 'Guarujá'. Never include hex codes, control characters, or misencoded strings like 'S0o', 'S6o', or '\xNN'."
},
{

`Expected Result`

{
"endereco": "R. França Pinto, 525, Enseada, Guarujá, SP",
"cidade": "Guarujá",
"estado": "São Paulo",
"erro": null
}

`Actual Result`

{
"endereco": "R. Fran\u007fa Pinto, 525- apto n\u0010 5, Ed. Solar dos Palmares, Enseada, Guaruj\u00101, SP",
"cidade": "Guaruj\u00101",
"estado": "S\u00050",
"erro": null
}

`Environment`

Model: gpt-4o-2024-08-06 Endpoint: chat.completions Response Format: json Total tokens used this month: 1,971,385,774 Total requests this month: 344,854

#
Additional Information

Please provide relevant details to help resolve the issue, such as:

  • ChatGPT Shared Link (if applicable).
  • Screenshots or videos demonstrating the problem.

-# ➜ Need to contact support? Visit the OpenAI Help Center.