zhangshenghang opened a new pull request, #11235:
URL: https://github.com/apache/seatunnel/pull/11235

   ### Purpose
   
   Fixes #9998. Custom LLM responses can return `choices[0].message.content` as 
a string that itself contains a JSON array, such as `["value"]`. The transform 
previously treated that value as a plain string, so users saw the array literal 
in the output column.
   
   ### Changes
   
   - Parse custom LLM string responses as a JSON list when possible.
   - Keep plain string responses as a single output value.
   - Avoid parsing the same custom response multiple times.
   - Add unit coverage for OpenAI-compatible custom responses whose content is 
a JSON array string.
   
   ### Validation
   
   - `./mvnw -pl seatunnel-transforms-v2 -DskipIT -Dskip.spotless=true 
-Dtest=LLMRequestJsonTest test`
   - `./mvnw spotless:apply`
   - `./mvnw -q -DskipTests verify`


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