Enum Class AnthropicApi.ContentBlock.Type

java.lang.Object
java.lang.Enum<AnthropicApi.ContentBlock.Type>
org.springframework.ai.anthropic.api.AnthropicApi.ContentBlock.Type
All Implemented Interfaces:
Serializable, Comparable<AnthropicApi.ContentBlock.Type>, Constable
Enclosing class:
AnthropicApi.ContentBlock

public static enum AnthropicApi.ContentBlock.Type extends Enum<AnthropicApi.ContentBlock.Type>
The ContentBlock type.
Since:
1.0.0
Author:
Christian Tzolov, Mariusz Bernacki, Thomas Vitale, Jihoon Kim, Alexandros Pappas, Jonghoon Park, Claudio Silva Junior, Filip Hrisafov, Soby Chacko, Austin Dase
  • Enum Constant Details

    • TOOL_USE

      public static final AnthropicApi.ContentBlock.Type TOOL_USE
      Tool request
    • TOOL_RESULT

      public static final AnthropicApi.ContentBlock.Type TOOL_RESULT
      Send tool result back to LLM.
    • TEXT

      public static final AnthropicApi.ContentBlock.Type TEXT
      Text message.
    • TEXT_DELTA

      public static final AnthropicApi.ContentBlock.Type TEXT_DELTA
      Text delta message. Returned from the streaming response.
    • THINKING_DELTA

      public static final AnthropicApi.ContentBlock.Type THINKING_DELTA
      When using extended thinking with streaming enabled, you'll receive thinking content via thinking_delta events. These deltas correspond to the thinking field of the thinking content blocks.
    • SIGNATURE_DELTA

      public static final AnthropicApi.ContentBlock.Type SIGNATURE_DELTA
      For thinking content, a special signature_delta event is sent just before the content_block_stop event. This signature is used to verify the integrity of the thinking block.
    • INPUT_JSON_DELTA

      public static final AnthropicApi.ContentBlock.Type INPUT_JSON_DELTA
      Tool use input partial JSON delta streaming.
    • IMAGE

      public static final AnthropicApi.ContentBlock.Type IMAGE
      Image message.
    • DOCUMENT

      public static final AnthropicApi.ContentBlock.Type DOCUMENT
      Document message.
    • THINKING

      public static final AnthropicApi.ContentBlock.Type THINKING
      Thinking message.
    • REDACTED_THINKING

      public static final AnthropicApi.ContentBlock.Type REDACTED_THINKING
      Redacted Thinking message.
    • FILE

      public static final AnthropicApi.ContentBlock.Type FILE
      File content block representing a file generated by Skills. Used in AnthropicSkillsResponseHelper to extract file IDs for downloading generated documents.
    • BASH_CODE_EXECUTION_TOOL_RESULT

      public static final AnthropicApi.ContentBlock.Type BASH_CODE_EXECUTION_TOOL_RESULT
      Bash code execution tool result returned in Skills responses. Observed in actual API responses where file IDs are nested within this content block. Required for JSON deserialization.
    • TEXT_EDITOR_CODE_EXECUTION_TOOL_RESULT

      public static final AnthropicApi.ContentBlock.Type TEXT_EDITOR_CODE_EXECUTION_TOOL_RESULT
      Text editor code execution tool result returned in Skills responses. Observed in actual API responses. Required for JSON deserialization.
    • SERVER_TOOL_USE

      public static final AnthropicApi.ContentBlock.Type SERVER_TOOL_USE
      Server-side tool use returned in Skills responses. Observed in actual API responses when Skills invoke server-side tools. Required for JSON deserialization.
  • Field Details

    • value

      public final String value
  • Method Details

    • values

      public static AnthropicApi.ContentBlock.Type[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AnthropicApi.ContentBlock.Type valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Get the value of the type.
      Returns:
      The value of the type.