Class DecisionResponseMetadata

java.lang.Object
org.springframework.ai.model.MutableResponseMetadata
org.springframework.ai.decision.DecisionResponseMetadata
All Implemented Interfaces:
ResponseMetadata

public class DecisionResponseMetadata extends MutableResponseMetadata
Metadata associated with a DecisionResponse: the response id and the model that answered, when the provider reports them, and the token usage. Two instances of the same class are equal when these three match; the entries put into the metadata map are not compared.
Since:
2.1.0
Author:
Thomas Vitale, Christian Tzolov
  • Constructor Details

    • DecisionResponseMetadata

      protected DecisionResponseMetadata(@Nullable String id, @Nullable String model, Usage usage)
      For subclasses, such as provider-specific metadata; use builder() otherwise.
  • Method Details

    • builder

      public static DecisionResponseMetadata.Builder builder()
    • getId

      public @Nullable String getId()
      The response id, or null when the provider doesn't report one.
    • getModel

      public @Nullable String getModel()
      The model that answered, or null when the provider doesn't report it.
    • getUsage

      public Usage getUsage()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object