Expand description
The Messages API implementations.
Structs§
- Cache
Control - Cache control for content blocks.
- Content
Block Delta Chunk - The content block delta chunk.
- Content
Block Start Chunk - The content block start chunk.
- Content
Block Stop Chunk - The content block stop chunk.
- Delta
Usage - The delta usage of the stream.
- Image
Content Block - The image content block.
- Image
Content Source - The image content source.
- MaxTokens
- The maximum number of tokens.
- Message
- The message.
- Message
Chunk Type Error - The error type for parsing message chunk type.
- Message
Delta Chunk - The message delta chunk.
- Message
Start Chunk - The message start chunk.
- Message
Stop Chunk - The message stop chunk.
- Messages
Request Body - The request body for the Messages API.
- Messages
Request Builder - A builder for the
MessagesRequestBody
. - Messages
Response Body - The response body for the Messages API.
- Metadata
- An object describing metadata about the request.
- Ping
Chunk - The ping chunk.
- Stop
Sequence - The stop sequence.
- Stream
Stop - The stream stop information.
- Temperature
- Amount of randomness injected into the response.
- Text
Content Block - The text content block.
- Text
Delta Content Block - The text delta content block.
- Thinking
- Thinking
Content Block - Tool
Definition - A tool definition that can be used by assistant.
- Tool
List - A list of tools that can be called by the assistant.
- Tool
Result - A result of a tool.
- Tool
Result Content Block - The tool result content block.
- ToolUse
- A tool use request.
- Tool
UseContent Block - The tool use content block.
- TopK
- Only sample from the top K options for each subsequent token.
- TopP
- Use nucleus sampling.
- Usage
- Billing and rate-limit usage.
- UserId
- An external identifier for the user who is associated with the request.
Enums§
- Cache
Control Type - The type of cache control.
- Cache
Ttl - Time to live for cache entries.
- Claude
Model - The model that will complete your prompt.
- Content
- The content of the message.
- Content
Block - The content block of the message.
- Content
Block Delta - Content
Block Start - Content
Flattening Error - The error type for the content flattening.
- Content
Type - The content type of the message.
- Image
Media Type - The media type of the image.
- Image
Media Type Parse Error - The error type for parsing the image media type from an extension in a path.
- Image
Source Type - The source type of the image.
- Message
Chunk - The stream chunk of messages.
- Message
Chunk Type - The type of message chunk.
- Message
Object Type - The object type for message.
- Messages
Error - The error type for the messages API.
- Role
- The role of the message.
- Stop
Reason - The reason that we stopped.
- Stream
Error - The error type for the streaming messages.
- Stream
Option - Whether to incrementally stream the response using server-sent events.
- System
Prompt - System prompt.
- Tool
Call Error - The error type for the tool call.