linrrzqqq opened a new pull request, #69302:
URL: https://github.com/apache/doris/pull/69302

   
   ### What problem does this PR solve?
   
   Problem Summary: 
   
   Improve batched AI function output reliability by adding optional structured 
output constraints and validating the returned results. Reuse static format 
definitions and preserve embedded NUL characters when parsing responses.
   
   Add the resource property `ai.enable_structured_output` (default: `true`). 
When disabled, requests remain batched and rely on the system prompt without 
provider format fields.
   
   For example, OpenAI Chat Completions requests include:
   
   ```json
   {
     "response_format": {
       "type": "json_schema",
       "json_schema": {
         "name": "ai_batch_result",
         "strict": true,
         "schema": {
           "type": "object",
           "properties": {"results": {"type": "array", "items": {"type": 
"string"}}},
           "required": ["results"],
           "additionalProperties": false
         }
       }
     }
   }
   ```
   
   ### Release note
   
   Add ai.enable_structured_output (default true). Disabling it omits provider 
format fields while retaining batching, prompts and result validation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to