mellea.stdlib.chat
class mellea.stdlib.chat.Message(role: 'Message.Role', content: str)
role
: str
: The role that this message came from (e.g., user, assistant).content
: str
: The content of the message.mellea.stdlib.chat.Message.parts()
mellea.stdlib.chat.Message.format_for_llm()
mellea.stdlib.chat.Message.__str__()
class mellea.stdlib.chat.ToolMessage(role: Message.Role, content: str, tool_output: Any, name: str, args: Mapping[str, Any], tool: ModelToolCall)
role
: the role of this message. Most backends/models use something like tool.content
: The content of the message; should be a stringified version of the tool_output.name
: The name of the tool/function.args
: The args required to call the function.tool_output
: the output of the tool/function call.tool
: the ModelToolCall representation.mellea.stdlib.chat.ToolMessage.format_for_llm()
mellea.stdlib.chat.ToolMessage.__str__()