Share via


ThreadMessageOptions.GetContentBlocks Method

Definition

Deserializes the underlying message content (stored as BinaryData) into a collection of MessageInputContentBlock objects.

public System.Collections.Generic.IEnumerable<Azure.AI.Agents.Persistent.MessageInputContentBlock> GetContentBlocks();
member this.GetContentBlocks : unit -> seq<Azure.AI.Agents.Persistent.MessageInputContentBlock>
Public Function GetContentBlocks () As IEnumerable(Of MessageInputContentBlock)

Returns

A sequence of content blocks if the original data was supplied as multiple structured elements.

Exceptions

Thrown if the binary content cannot be deserialized as a collection of MessageInputContentBlock.

Remarks

Use this method when you know or expect that Content was provided as one or more structured content blocks. If the message content was just a single string, this may cause a deserialization error.

Applies to