Class ContentBlockDelta

    • Method Detail

      • text

        public final String text()

        The content text.

        Returns:
        The content text.
      • toolUse

        public final ToolUseBlockDelta toolUse()

        Information about a tool that the model is requesting to use.

        Returns:
        Information about a tool that the model is requesting to use.
      • reasoningContent

        public final ReasoningContentBlockDelta reasoningContent()

        Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

        Returns:
        Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromText

        public static ContentBlockDelta fromText​(String text)
        Create an instance of this class with text() initialized to the given value.

        The content text.

        Parameters:
        text - The content text.
      • fromToolUse

        public static ContentBlockDelta fromToolUse​(ToolUseBlockDelta toolUse)
        Create an instance of this class with toolUse() initialized to the given value.

        Information about a tool that the model is requesting to use.

        Parameters:
        toolUse - Information about a tool that the model is requesting to use.
      • fromToolUse

        public static ContentBlockDelta fromToolUse​(Consumer<ToolUseBlockDelta.Builder> toolUse)
        Create an instance of this class with toolUse() initialized to the given value.

        Information about a tool that the model is requesting to use.

        Parameters:
        toolUse - Information about a tool that the model is requesting to use.
      • fromReasoningContent

        public static ContentBlockDelta fromReasoningContent​(ReasoningContentBlockDelta reasoningContent)
        Create an instance of this class with reasoningContent() initialized to the given value.

        Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

        Parameters:
        reasoningContent - Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
      • fromReasoningContent

        public static ContentBlockDelta fromReasoningContent​(Consumer<ReasoningContentBlockDelta.Builder> reasoningContent)
        Create an instance of this class with reasoningContent() initialized to the given value.

        Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

        Parameters:
        reasoningContent - Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.