Types
ContentBlock
ErrorResponse
ErrorResponse type {
type: "error",
error: Any
}
Model
PromptCachingBetaCreateMessageParams
PromptCachingBetaCreateMessageParams type {
model: Model,
messages: Vec,
max_tokens: Int,
metadata: Any?,
stop_sequences: Vec?,
stream: Bool?,
system: Any?,
temperature: Float?,
tool_choice: ToolChoice?,
tools: Vec?,
top_k: Int?,
top_p: Float?
}
PromptCachingBetaInputMessage
PromptCachingBetaInputMessage type {
role: "user" | "assistant",
content: Any
}
PromptCachingBetaMessage
PromptCachingBetaMessage type {
id: Str,
type: "message",
role: "assistant",
content: Vec,
model: Model,
stop_reason: Any,
stop_sequence: Any,
usage: Any
}
PromptCachingBetaMessagesPostRequest
PromptCachingBetaMessagesPostRequest type {
model: Model,
messages: Vec,
max_tokens: Int,
metadata: Any?,
stop_sequences: Vec?,
stream: Bool?,
system: Any?,
temperature: Float?,
tool_choice: ToolChoice?,
tools: Vec?,
top_k: Int?,
top_p: Float?
}
PromptCachingBetaMessagesPostResponse
PromptCachingBetaMessagesPostResponse type {
id: Str,
type: "message",
role: "assistant",
content: Vec,
model: Model,
stop_reason: Any,
stop_sequence: Any,
usage: Any
}
PromptCachingBetaTool
PromptCachingBetaTool type {
description: Str?,
name: Str,
input_schema: Any,
cache_control: Any?
}
ToolChoice
Functions
beta-messages-post
fn (request: PromptCachingBetaMessagesPostRequest): PromptCachingBetaMessagesPostResponse
POST /v1/messages?beta=prompt_caching - Create a Message