discourse-ai/app
Roman Rizzi ff2e18f9ca
FIX: Structured output discrepancies. (#1340)
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.
2025-05-15 11:32:10 -03:00
..
controllers/discourse_ai FEATURE: Examples support for personas. (#1334) 2025-05-13 10:06:16 -03:00
helpers/discourse_ai/ai_bot FIX: automatically bust cache for share ai assets (#942) 2024-11-22 11:23:15 +11:00
jobs FEATURE: Add streaming to composer helper (#1256) 2025-04-14 08:18:50 -07:00
mailers FEATURE: support sending AI report to an email address (#368) 2023-12-19 17:51:49 +11:00
models FIX: Structured output discrepancies. (#1340) 2025-05-15 11:32:10 -03:00
serializers FEATURE: Examples support for personas. (#1334) 2025-05-13 10:06:16 -03:00
services DEV: Use full URL for problem check message (#1165) 2025-03-05 11:31:23 +08:00
views FIX: automatically bust cache for share ai assets (#942) 2024-11-22 11:23:15 +11:00