TextContentBuilder
DSL builder for constructing TextContent instances.
Required
text - The text content string
Optional
annotations - Content annotations (inherited from MediaContentBuilder)
meta - Additional metadata (inherited from MediaContentBuilder)
Example usage in sampling messages:
createMessageRequest {
maxTokens = 100
messages {
userText {
text = "What is the capital of France?"
}
}
}Content copied to clipboard
Example with annotations:
userText {
text = "Important message"
annotations(Annotations(priority = 1.0))
}Content copied to clipboard
See also
Properties
Functions
Link copied to clipboard
Sets optional annotations for the content.
fun annotations(audience: List<Role>? = null, priority: Double? = null, lastModified: String? = null)
Sets optional annotations for the content with individual parameters.
Link copied to clipboard
Sets optional metadata for the content using a DSL builder.