wenjin272 commented on code in PR #843:
URL: https://github.com/apache/flink-agents/pull/843#discussion_r3649726742


##########
api/src/main/java/org/apache/flink/agents/api/chat/model/BaseChatModelConnection.java:
##########
@@ -55,4 +77,33 @@ public ResourceType getResourceType() {
      */
     public abstract ChatMessage chat(
             List<ChatMessage> messages, List<Tool> tools, Map<String, Object> 
modelParams);
+
+    /**
+     * Process a chat request that carries an output schema, and return a chat 
response.
+     *
+     * <p>{@code outputSchema} is framework-level execution metadata, kept off 
{@code modelParams}
+     * so that it can never reach a provider SDK request as a generation 
parameter. It is either a
+     * POJO {@link Class} or an {@link 
org.apache.flink.agents.api.agents.OutputSchema} (a {@code
+     * RowTypeInfo} wrapper); the two cases are distinguished by the 
connection that consumes it.
+     *
+     * <p>This default implementation <b>ignores</b> {@code outputSchema} and 
delegates to {@link
+     * #chat(List, List, Map)}. Connections without a native structured-output 
translation inherit
+     * it unchanged and need no edits. A connection that does translate a 
schema into a native
+     * provider parameter overrides this overload, and reports its capability 
via {@link
+     * #supportsNativeStructuredOutput(String)}.
+     *
+     * @param messages the input chat messages
+     * @param tools the tools can be called by the model
+     * @param modelParams the additional arguments passed to the model
+     * @param outputSchema the schema the response should conform to, or null 
for an unconstrained
+     *     response
+     * @return the chat response containing model outputs
+     */
+    public ChatMessage chat(

Review Comment:
   make sense



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