langchain_community.chat_models.cohere
.get_role¶
- langchain_community.chat_models.cohere.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