Message.UserMessages sent by the user.
type content = | String of stringSimple text message
*)| Blocks of Content_block.t listComplex message with multiple content blocks
*)The content of a user message.
incoming_jsont is the codec for parsing incoming user messages from CLI. This parses the envelope format with "message" wrapper.
outgoing_jsont is the codec for encoding outgoing user messages to CLI. This produces the envelope format with "message" wrapper containing "role" and "content" fields.
val create_string : string -> tcreate_string s creates a user message with simple text content.
val create_blocks : Content_block.t list -> tcreate_blocks blocks creates a user message with content blocks.
val create_with_tool_result :
tool_use_id:string ->
content:Jsont.json ->
?is_error:bool ->
unit ->
tcreate_with_tool_result ~tool_use_id ~content ?is_error () creates a user message containing a tool result. Content can be a string or array.