Record Class ProviderResponse
java.lang.Object
java.lang.Record
ai.doctruth.ProviderResponse
- Record Components:
rawJson- the raw JSON body returned by the provider, untouched.usage- token-usage + model-version metadata for the call.
What an
LlmProvider returns on a successful call: the raw JSON the LLM produced
plus the per-call ProviderUsage. The library parses rawJson into the
caller's target type via Jackson; providers do not interpret it.
Invariants (compact constructor):
rawJsonnon-null and non-blank.usagenon-null.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionProviderResponse(String rawJson, ProviderUsage usage) Creates an instance of aProviderResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.rawJson()Returns the value of therawJsonrecord component.final StringtoString()Returns a string representation of this record class.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rawJson
-
usage
-