-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(JsonSchemaValidator): fix recursive loop and general LLM (claude,…
… mistral...) compatibility (#7556) * Feat: Fix recursive conversion in JsonSchemaValidator (autofix generated by ClaudeOpus). Modify the behaviour to build the error template in a single user_message instead of two separate. Modify the behaviour to only include latest message instead of full history (very costly if long looping pipeline) * Feat: Fix recursive conversion in JsonSchemaValidator (autofix generated by ClaudeOpus). Modify the behaviour to build the error template in a single user_message instead of two separate. Modify the behaviour to only include latest message instead of full history (very costly if long looping pipeline) * reno * fix test * Verify provided message contains JSON object to begin with * Minor detail --------- Co-authored-by: Vladimir Blagojevic <[email protected]>
- Loading branch information
1 parent
75ad76a
commit d158be4
Showing
3 changed files
with
62 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/fix-recursive-json-schema-validator-cdb7684de3c75e4e.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
enhancements: | ||
- | | ||
Made JSON schema validator compatible with all LLM by switching error template handling to a single user message. | ||
Also reduce cost by only including last error instead of full message history. | ||
fixes: | ||
- | | ||
Fix recursive JSON type conversion in the schema validator to be less aggressive (no infinite recursion). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters