langchain.chat_models.cohere.get_role

langchain.chat_models.cohere.get_role(message: BaseMessage) str[source]

Get the role of the message.

Parameters

message – The message.

Returns

The role of the message.

Raises

ValueError – If the message is of an unknown type.