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

content parameter of TextMessage class can also be list #432

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

rjambrecic
Copy link
Collaborator

@rjambrecic rjambrecic commented Jan 10, 2025

Why are these changes needed?

Fixes Pydantic error breaking MultimodalConversableAgent

When using the MultimodalConversableAgent, the create_received_message_model function occasionally attempts to construct a TextMessage by setting its content to a structure like [{'type': 'text', 'text': '...'}].

As a result, to accommodate this structure in TextMessage.content, the type annotation should be updated to include list[dict[str, str]].

Related issue number

Closes #383

Checks

@rjambrecic rjambrecic changed the title content parameter of TextMessage class can also be dict content parameter of TextMessage class can also be list Jan 10, 2025
@rjambrecic rjambrecic requested a review from davorrunje January 10, 2025 12:11
@davorrunje davorrunje merged commit aeb8254 into main Jan 10, 2025
217 of 225 checks passed
@kumaranvpl kumaranvpl deleted the fix-text-message branch January 13, 2025 09:06
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.

[Bug]: Pydantic error breaks MultimodalConversableAgent
2 participants