Record Class CreateChatCompletionRequest.StreamOptions
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.CreateChatCompletionRequest.StreamOptions
- Record Components:
includeUsage- If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
- Enclosing class:
- CreateChatCompletionRequest
-
Constructor Summary
ConstructorsConstructorDescriptionStreamOptions(Boolean includeUsage) Creates an instance of aStreamOptionsrecord 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.Returns the value of theincludeUsagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StreamOptions
Creates an instance of aStreamOptionsrecord class.- Parameters:
includeUsage- the value for theincludeUsagerecord component
-
-
Method Details
-
withUsageIncluded
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
includeUsage
Returns the value of theincludeUsagerecord component.- Returns:
- the value of the
includeUsagerecord component
-