MessagesMessageParamContentUnion4 - TypeScript SDK
MessagesMessageParamContentUnion4 type definition
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
MessagesMessageParamContentUnion4 type definition
models.AnthropicTextBlockParamconst value: models.AnthropicTextBlockParam = {
text: "Hello, world!",
type: "text",
};
models.AnthropicImageBlockParamconst value: models.AnthropicImageBlockParam = {
source: {
data: "/9j/4AAQ...",
mediaType: "image/jpeg",
type: "base64",
},
type: "image",
};
models.AnthropicDocumentBlockParamconst value: models.AnthropicDocumentBlockParam = {
source: {
data: "Hello, world!",
mediaType: "text/plain",
type: "text",
},
type: "document",
};
models.ContentToolUseconst value: models.ContentToolUse = {
id: "<id>",
name: "<value>",
type: "tool_use",
};
models.ContentToolResultconst value: models.ContentToolResult = {
toolUseId: "<id>",
type: "tool_result",
};
models.ContentThinkingconst value: models.ContentThinking = {
signature: "<value>",
thinking: "<value>",
type: "thinking",
};
models.ContentRedactedThinkingconst value: models.ContentRedactedThinking = {
data: "<value>",
type: "redacted_thinking",
};
models.ContentServerToolUseconst value: models.ContentServerToolUse = {
id: "<id>",
name: "<value>",
type: "server_tool_use",
};
models.ContentWebSearchToolResultconst value: models.ContentWebSearchToolResult = {
content: [
{
encryptedContent: "enc_content_0",
title: "Example Page",
type: "web_search_result",
url: "https://example.com",
},
],
toolUseId: "<id>",
type: "web_search_tool_result",
};
models.AnthropicSearchResultBlockParamconst value: models.AnthropicSearchResultBlockParam = {
content: [
{
text: "Result content",
type: "text",
},
],
source: "example_source",
title: "Example Result",
type: "search_result",
};
models.ContentCompactionconst value: models.ContentCompaction = {
content: null,
type: "compaction",
};
models.MessagesAdvisorToolResultBlockconst value: models.MessagesAdvisorToolResultBlock = {
content: {
"text": "Advisor response text",
"type": "advisor_result",
},
toolUseId: "srvtoolu_01abc",
type: "advisor_tool_result",
};