Skip to content

Conversation

@MadaraUchiha-314
Copy link
Contributor

@MadaraUchiha-314 MadaraUchiha-314 commented Apr 4, 2025

  • Makes the role attribute in Message optional
  • Many types included in AnyMessage don't have role in it. This makes it difficult for anyone implementing the protocol to send a response back as there's validation failure when AnyMessage is converted to Message

Copy link
Contributor

@nfcampos nfcampos left a comment

Choose a reason for hiding this comment

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

If a message has no role how do you distinguish it from other message types?

@MadaraUchiha-314
Copy link
Contributor Author

If a message has no role how do you distinguish it from other message types?

Are you talking about message.type or message.role

In langgraph provided message interfaces like HumanMessage, ChatMessage and BaseMessage, they all have the attribute called type

role is not present in most of them

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.

2 participants