Class AnthropicCreateMessageResponse

java.lang.Object
dev.langchain4j.model.anthropic.internal.api.AnthropicCreateMessageResponse

public class AnthropicCreateMessageResponse extends Object
Response object from the Anthropic Create Message API.

Contains the model's response including generated content, usage statistics, and metadata about the completion.

  • Field Details

    • id

      public String id
      Unique identifier for this message.
    • type

      public String type
      The type of response (typically "message").
    • role

      public String role
      The role of the responder (typically "assistant").
    • content

      public List<AnthropicContent> content
      The content blocks in the response.
    • model

      public String model
      The model that generated the response.
    • stopReason

      public String stopReason
      The reason the model stopped generating (e.g., "end_turn", "max_tokens", "tool_use").
    • stopSequence

      public String stopSequence
      The stop sequence that caused generation to stop, if applicable.
    • usage

      public AnthropicUsage usage
      Token usage statistics for the request and response.
  • Constructor Details

    • AnthropicCreateMessageResponse

      public AnthropicCreateMessageResponse()
      Default constructor.
  • Method Details