weiqingy opened a new issue, #1256:
URL: https://github.com/apache/flink-agents/issues/1256

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/flink-agents/issues) and found nothing 
similar.
   
   ### Description
   
   @wenjin272 suggested this on #1129.
   
   A `RowTypeInfo` output schema never gets native structured output today:
   - The native connections accept only a POJO class (Java) or a pydantic model 
(Python), so they skip a `RowTypeInfo`.
   - The prompt path describes the schema with the type's string form 
(`toString()` in Java, `str()` in Python), not JSON Schema.
   - The Java `BaseChatModelConnection.chat` Javadoc calls the skip a permanent 
fallback.
   
   Proposal: render a flat `RowTypeInfo` (basic field types only) as a JSON 
Schema object, in both languages:
   - every field required
   - `additionalProperties: false`
   
   Use it in two steps:
   1. In the prompt, in place of the string form.
   2. As the native schema, so `AUTO` and `NATIVE` work for a `RowTypeInfo`. 
The connections currently take a class, so this step needs them to accept a 
schema document as well.
   
   A nested or non-basic `RowTypeInfo` keeps today's behavior. The guide and 
the Javadoc above are updated to match.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


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