Enum Class CitationDocument.DocumentType

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

public static enum CitationDocument.DocumentType extends Enum<CitationDocument.DocumentType>
Document types supported by Anthropic Citations API. Each type uses different citation location formats in the response.
Since:
1.1.0
Author:
Soby Chacko
  • Enum Constant Details

    • PLAIN_TEXT

      public static final CitationDocument.DocumentType PLAIN_TEXT
      Plain text document with character-based citations. Text is automatically chunked by sentences and citations return character start/end indices.
    • PDF

      public static final CitationDocument.DocumentType PDF
      PDF document with page-based citations. Content is extracted and chunked from the PDF, and citations return page start/end numbers.
    • CUSTOM_CONTENT

      public static final CitationDocument.DocumentType CUSTOM_CONTENT
      Custom content with user-defined blocks and block-based citations. Content is provided as explicit blocks, and citations return block start/end indices.
  • Method Details

    • values

      public static CitationDocument.DocumentType[] 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 CitationDocument.DocumentType 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