Stay organized with collections
Save and categorize content based on your preferences.
public final class TextPart implements Part
Represents text or string based data sent to and received from requests.
Summary
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-21 UTC."],[],[],null,["# TextPart\n========\n\n*** ** * ** ***\n\n[Kotlin](/ai/reference/kotlin/com/google/ai/edge/aicore/TextPart \"View this page in Kotlin\") \\|Java \n\n\n```\npublic final class TextPart implements Part\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRepresents text or string based data sent to and received from requests.\n\nSummary\n-------\n\n| ### Public constructors |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TextPart](/ai/reference/com/google/ai/edge/aicore/TextPart#TextPart(kotlin.String))`(@`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull.html)` `[String](https://developer.android.com/reference/java/lang/String.html)` text)` |\n\n| ### Public methods |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| `final @`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull.html)` `[String](https://developer.android.com/reference/java/lang/String.html) | [getText](/ai/reference/com/google/ai/edge/aicore/TextPart#getText())`()` |\n\nPublic constructors\n-------------------\n\n### TextPart\n\n```\npublic TextPart(@NonNull String text)\n``` \n\nPublic methods\n--------------\n\n### getText\n\n```\npublic final @NonNull String getText()\n```"]]