Title: wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php | Developer.WordPress.org

---

# File: wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php

 * method[MessagePart::toArray()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/toarray/)
 * {@inheritDoc}
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/toarray/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/toarray/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:201](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L201-L219)
 * method[MessagePart::fromArray()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/fromarray/)
 * {@inheritDoc}
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/fromarray/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/fromarray/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:225](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L225-L245)
 * method[MessagePart::__clone()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__clone/)
 * Performs a deep clone of the message part.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__clone/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__clone/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:254](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L254-L265)
 * method[MessagePart::getType()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettype/)
 * Gets the type of this message part.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettype/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettype/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:124](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L124-L127)
 * method[MessagePart::getThoughtSignature()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getthoughtsignature/)
 * Gets the thought signature.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getthoughtsignature/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getthoughtsignature/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:135](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L135-L138)
 * method[MessagePart::getText()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettext/)
 * Gets the text content.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettext/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/gettext/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:146](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L146-L149)
 * method[MessagePart::getFile()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfile/)
 * Gets the file.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfile/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfile/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:157](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L157-L160)
 * method[MessagePart::getFunctionCall()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctioncall/)
 * Gets the function call.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctioncall/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctioncall/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:168](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L168-L171)
 * method[MessagePart::getFunctionResponse()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctionresponse/)
 * Gets the function response.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctionresponse/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getfunctionresponse/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:179](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L179-L182)
 * method[MessagePart::getJsonSchema()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getjsonschema/)
 * {@inheritDoc}
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getjsonschema/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getjsonschema/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:188](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L188-L193)
 * method[MessagePart::getChannel()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getchannel/)
 * Gets the channel this message part belongs to.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getchannel/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/getchannel/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:113](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L113-L116)
 * class[MessagePart](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/)
 * Represents a part of a message.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:38](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L38-L266)
 * method[MessagePart::__construct()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__construct/)
 * Constructor that accepts various content types and infers the message part type.
 * Used by [10 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__construct/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wordpress-aiclient-messages-dto-messagepart/__construct/#uses)
   | Source: [wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php:85](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Messages/DTO/MessagePart.php#L85-L105)