Python class
Message
Messageβ
class max.pipelines.request.Message(*, id, role, content, name=None, status=None, tool_calls=None)
Bases: BaseModel
A generic message in the conversation.
-
Parameters:
-
- id (str)
- role (MessageRole)
- content (str | list[InputTextContent | InputImageContent | InputFileContent | InputVideoContent | Annotated[OutputTextContent | RefusalContent | ReasoningSummaryContent | OutputImageContent | OutputVideoContent, FieldInfo(annotation=NoneType, required=True, discriminator='type')]])
- name (str | None)
- status (MessageStatus | None)
- tool_calls (list[FunctionCall] | None)
contentβ
content: str | list[InputContent | OutputContent]
idβ
id: str
model_configβ
model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
nameβ
roleβ
role: MessageRole
statusβ
status: MessageStatus | None
tool_callsβ
tool_calls: list[FunctionCall] | None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!