Interface Content
- All Known Implementing Classes:
Content.AudioContent,Content.CodeExecutionCallContent,Content.CodeExecutionResultContent,Content.DocumentContent,Content.FileSearchCallContent,Content.FileSearchResultContent,Content.FunctionCallContent,Content.FunctionResultContent,Content.GoogleSearchCallContent,Content.GoogleSearchResultContent,Content.ImageContent,Content.McpServerToolCallContent,Content.McpServerToolResultContent,Content.TextContent,Content.ThoughtContent,Content.UrlContextCallContent,Content.UrlContextResultContent,Content.VideoContent
public sealed interface Content
permits Content.TextContent, Content.ImageContent, Content.AudioContent, Content.DocumentContent, Content.VideoContent, Content.ThoughtContent, Content.FunctionCallContent, Content.FunctionResultContent, Content.CodeExecutionCallContent, Content.CodeExecutionResultContent, Content.UrlContextCallContent, Content.UrlContextResultContent, Content.GoogleSearchCallContent, Content.GoogleSearchResultContent, Content.McpServerToolCallContent, Content.McpServerToolResultContent, Content.FileSearchCallContent, Content.FileSearchResultContent
Represents the content of the response or input.
This is a sealed interface corresponding to the 'Content' schema in the OpenAPI spec.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAnnotation for text content.static final recordContent containing audio.static final recordArguments for a code execution call.static final recordContent representing a code execution call.static final recordContent representing the result of a code execution.static final recordContent containing a document.static final recordContent representing a file search call.static final recordResult of a single file search.static final recordContent representing the result of a file search.static final recordContent representing a function call.static final recordContent representing the result of a function call.static final recordArguments for a Google Search call.static final recordContent representing a Google Search call.static final recordResult of a single Google Search.static final recordContent representing the result of a Google Search call.static final recordContent containing an image.static final recordContent representing an MCP server tool call.static final recordContent representing the result of an MCP server tool call.static enumResolution of the media.static final recordContent containing text.static final recordContent containing thought process.static final recordStructure for multimodal tool results.static final recordArguments for a URL context call.static final recordContent representing a URL context call.static final recordResult of a single URL context retrieval.static final recordContent representing the result of a URL context call.static enumStatus of the URL context retrieval.static final recordContent containing video. -
Method Summary
-
Method Details
-
type
String type()Returns the type of content.- Returns:
- The content type.
-