twosom opened a new pull request, #634:
URL: https://github.com/apache/flink-agents/pull/634
<!--
* 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: #633
### Purpose of change
<!-- What is the purpose of this change? -->
The ChatModelAction currently fails with a JsonParseException when an LLM
returns a structured output wrapped in Markdown code blocks (e.g., ```json ...
```). This happens because Jackson's ObjectMapper expects a valid JSON start
character ({ or [) but encounters a backtick (`) instead.
so, I added a utility method to extract raw JSON string from LLM responses
that include Markdown decorators.
### Tests
<!-- How is this change verified? -->
Added some unit tests for clean llm response
### API
<!-- Does this change touches any public APIs? -->
### Documentation
<!-- Do not remove this section. Check the proper box only. -->
- [ ] `doc-needed` <!-- Your PR changes impact docs -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-included` <!-- Your PR already contains the necessary
documentation updates -->
--
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]