Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[JsonSchemaValidator]: fix recusirve loop and fix for claude model #7555

Conversation

lambda-science
Copy link

@lambda-science lambda-science commented Apr 17, 2024

…output from an LLM

Related Issues

Proposed Changes:

  • Claude Compatibility: modified the behaviour so that (i) error template is now a single message with generated json, error and schema (ii) make it so that validated messages are always "Assistant" chatmessage (for next pipeline step) and validation_errors are always "User" chatmessag (for LLM loops)
  • Recursive Loop in type conversion: used Claude OPUS to automatically generate a fix based on the written issue.

How did you test it?

Tested on my personal use-case and it solved my issues.

Notes for the reviewer

The behabviour is modified to only include the last messages from the conversation and not the whole history of messages (less cost for long pipeline loops, not necessary to havep previous messages)

Checklist

@lambda-science lambda-science requested a review from a team as a code owner April 17, 2024 14:12
@lambda-science lambda-science requested review from masci and removed request for a team April 17, 2024 14:12
@lambda-science lambda-science marked this pull request as draft April 17, 2024 14:12
@github-actions github-actions bot added 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JsonSchemaValidator: unintended primitive value conversion in _recursive_json_to_object method
1 participant