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

update message history validation to be per message #988

Closed

Conversation

dtam
Copy link
Contributor

@dtam dtam commented Aug 5, 2024

No description provided.

@dtam dtam changed the base branch from main to 0.6.0-dev August 6, 2024 21:25
@dtam dtam changed the base branch from 0.6.0-dev to main August 6, 2024 21:26
@dtam dtam changed the base branch from main to 0.6.0-dev August 6, 2024 21:26
@zsimjee
Copy link
Collaborator

zsimjee commented Aug 6, 2024

punt to 060

@dtam dtam added this to the v0.6.0 release tracker milestone Aug 7, 2024
@@ -380,7 +397,9 @@ def prepare_msg_history(

# validate msg_history
if "msg_history" in self.validation_map:
self.validate_msg_history(call_log, formatted_msg_history, attempt_number)
formatted_msg_history = self.validate_msg_history( # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this msg_history being mutated during validation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deep let us deep copy this

Comment on lines +316 to +319
# Create a mock object for the mock_llm_api function
mock_llm_api = mocker.Mock()

mock_llm_api.return_value = json.dumps({"name": "Fluffy"})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.

@dtam
Copy link
Contributor Author

dtam commented Sep 30, 2024

rolled this into #1082

@dtam dtam closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants