Class DecisionResponseMetadata

java.lang.Object
dev.langchain4j.model.decision.response.DecisionResponseMetadata

@Experimental public class DecisionResponseMetadata extends Object
The metadata of a DecisionResponse: the modelName() that produced the answers and the tokenUsage() the call consumed. Provider integrations extend this class (and its self-typed DecisionResponseMetadata.Builder) to add provider-specific metadata.
Since:
1.21.0
  • Constructor Details

  • Method Details

    • modelName

      public String modelName()
      The name of the model that produced the answers, as reported by the provider. This can be more specific than the requested name, for example a pinned version when an alias such as "latest" was requested.
    • tokenUsage

      public TokenUsage tokenUsage()
    • equals

      public boolean equals(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
    • builder

      public static DecisionResponseMetadata.Builder<?> builder()