Skip to content

Latest commit

 

History

History
71 lines (60 loc) · 2.38 KB

api.md

File metadata and controls

71 lines (60 loc) · 2.38 KB

Messages

Types:

from anthropic.types import (
    ContentBlock,
    ContentBlockDeltaEvent,
    ContentBlockStartEvent,
    ContentBlockStopEvent,
    ImageBlockParam,
    InputJSONDelta,
    Message,
    MessageDeltaEvent,
    MessageDeltaUsage,
    MessageParam,
    MessageStartEvent,
    MessageStopEvent,
    MessageStreamEvent,
    Model,
    RawContentBlockDeltaEvent,
    RawContentBlockStartEvent,
    RawContentBlockStopEvent,
    RawMessageDeltaEvent,
    RawMessageStartEvent,
    RawMessageStopEvent,
    RawMessageStreamEvent,
    TextBlock,
    TextBlockParam,
    TextDelta,
    Tool,
    ToolResultBlockParam,
    ToolUseBlock,
    ToolUseBlockParam,
    Usage,
)

Methods:

  • client.messages.create(**params) -> Message
  • client.messages.stream(*args) -> MessageStreamManager[MessageStream] | MessageStreamManager[MessageStreamT]

Beta

PromptCaching

Messages

Types:

from anthropic.types.beta.prompt_caching import (
    PromptCachingBetaCacheControlEphemeral,
    PromptCachingBetaImageBlockParam,
    PromptCachingBetaMessage,
    PromptCachingBetaMessageParam,
    PromptCachingBetaTextBlockParam,
    PromptCachingBetaTool,
    PromptCachingBetaToolResultBlockParam,
    PromptCachingBetaToolUseBlockParam,
    PromptCachingBetaUsage,
    RawPromptCachingBetaMessageStartEvent,
    RawPromptCachingBetaMessageStreamEvent,
)

Methods: