Roman
(Roman Rizzi)
Maio 16, 2025, 12:24pm
10
O erro do Gemini foi corrigido em:
main ← structured_output_differences
opened 02:09PM - 15 May 25 UTC
This change fixes two bugs and adds a safeguard.
The first issue is that the … schema Gemini expected differed from the one sent, resulting in 400 errors when performing completions.
The second issue was that creating a new persona won't define a method for `response_format`. This has to be explicitly defined when we wrap it inside the Persona class. Also, There was a mismatch between the default value and what we stored in the DB. Some parts of the code expected symbols as keys and others as strings.
Finally, we add a safeguard when, even if asked to, the model refuses to reply with a valid JSON. In this case, we are making a best-effort to recover and stream the raw response.
Ele esperava um formato ligeiramente diferente para o esquema JSON. Além disso, agora trataremos a conclusão como texto simples se o modelo não retornar JSON válido quando solicitado.
5 curtidas