get_role#
- langchain_cohere.chat_models.get_role(message: BaseMessage) str [source]#
Get the role of the message.
- Parameters:
message (BaseMessage) – The message.
- Returns:
The role of the message.
- Raises:
ValueError – If the message is of an unknown type.
- Return type:
str