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

make subscription methods more consistent with __contains__ #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jmorganca
Copy link
Member

@jmorganca jmorganca commented Nov 24, 2024

message["tool_calls"] will now raise an exception if it's not set to be consistent with the old map behavior and the __contains__ operation updated in 0.4.1

@jmorganca jmorganca changed the title make subscription methods more consistent with maps make subscription methods more consistent with previous behavior Nov 24, 2024
@jmorganca jmorganca changed the title make subscription methods more consistent with previous behavior make subscription methods more consistent with __contains__ Nov 24, 2024
@@ -61,7 +82,20 @@ def __contains__(self, key: str) -> bool:
return False

def get(self, key: str, default: Any = None) -> Any:
return getattr(self, key, default)
"""
>>> msg = Message(role='user')
Copy link
Member Author

Choose a reason for hiding this comment

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

Can cut down on some of the tests if they are redundant

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.

1 participant