weiqingy opened a new pull request, #1252:
URL: https://github.com/apache/flink-agents/pull/1252

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: Fixes #280
   
   ### Purpose of change
   
   Native structured output is implemented across the providers, but the docs 
only mention `structured_output` on the response event. This adds a user guide, 
as requested on #280, so users can see how to configure it, which providers 
enforce a schema natively, and what happens when they don't.
   
   New page: Calling LLMs > Structured Output 
(`calling-llms/structured-output.md`). It covers:
   
   - Declaring a schema (Pydantic model, POJO, or `RowTypeInfo`) on a ReAct 
Agent or a `ChatRequestEvent`, and reading the parsed result.
   - The `structured_output_strategy` setting: `AUTO`, `NATIVE` and `PROMPT`, 
and how each combines with what the connection supports.
   - How a native request runs: the tool loop without the schema, then one 
conversion call that carries it, and how the ReAct Agent's schema prompt 
changes.
   - A per-provider table of recommended models and infeasible cases, plus 
provider notes (Azure `model_of_azure_deployment`, Gemini with tools, 
conflicting `response_format` / `output_config`, cross-language setups).
   - Schema rules: one enum rule for Java and Python with two Java caveats, 
Java POJO limits (prompt-text descriptions, `Map` fields on strict providers, 
recursive types), and Python rendering.
   
   All examples have Java and Python tabs. The chat, ReAct agent and provider 
pages now link to the new page.
   
   ### Tests
   
   Docs only. Every claim was checked against the code on `main`, and every 
`{{< ref >}}` target and anchor was checked by hand. I did not run a local Hugo 
build.
   
   ### API
   
   None.
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [x] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [x] Yes
   - [ ] No
   
   Generated-by: GitHub Copilot CLI 1.0.97 (Claude Opus 5.5)
   


-- 
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]

Reply via email to