Record Class OpenAiApi.Usage.PromptTokensDetails
java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiApi.Usage.PromptTokensDetails
- Record Components:
audioTokens- Audio input tokens present in the prompt.cachedTokens- Cached tokens present in the prompt.
- Enclosing class:
OpenAiApi.Usage
-
Constructor Summary
ConstructorsConstructorDescriptionPromptTokensDetails(Integer audioTokens, Integer cachedTokens) Creates an instance of aPromptTokensDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaudioTokensrecord component.Returns the value of thecachedTokensrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PromptTokensDetails
Creates an instance of aPromptTokensDetailsrecord class.- Parameters:
audioTokens- the value for theaudioTokensrecord componentcachedTokens- the value for thecachedTokensrecord component
-
-
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). -
audioTokens
Returns the value of theaudioTokensrecord component.- Returns:
- the value of the
audioTokensrecord component
-
cachedTokens
Returns the value of thecachedTokensrecord component.- Returns:
- the value of the
cachedTokensrecord component
-