Class ResponseOutputText
-
- All Implemented Interfaces:
public final class ResponseOutputTextA text output from the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseOutputText.BuilderA builder for ResponseOutputText.
public final classResponseOutputText.AnnotationAn annotation that applies to a span of output text.
public final classResponseOutputText.LogprobThe log probability of a token.
-
Method Summary
Modifier and Type Method Description final List<ResponseOutputText.Annotation>annotations()The annotations of the text output. final Stringtext()The text output from the model. final JsonValue_type()The type of the output text. final Optional<List<ResponseOutputText.Logprob>>logprobs()final JsonField<List<ResponseOutputText.Annotation>>_annotations()Returns the raw JSON value of annotations. final JsonField<String>_text()Returns the raw JSON value of text. final JsonField<List<ResponseOutputText.Logprob>>_logprobs()Returns the raw JSON value of logprobs. final Map<String, JsonValue>_additionalProperties()final ResponseOutputText.BuildertoBuilder()final ResponseOutputTextvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseOutputText.Builderbuilder()Returns a mutable builder for constructing an instance of ResponseOutputText. -
-
Method Detail
-
annotations
final List<ResponseOutputText.Annotation> annotations()
The annotations of the text output.
-
_type
final JsonValue _type()
The type of the output text. Always
output_text.Expected to always return the following:
JsonValue.from("output_text")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
logprobs
final Optional<List<ResponseOutputText.Logprob>> logprobs()
-
_annotations
final JsonField<List<ResponseOutputText.Annotation>> _annotations()
Returns the raw JSON value of annotations.
Unlike annotations, this method doesn't throw if the JSON field has an unexpected type.
-
_text
final JsonField<String> _text()
Returns the raw JSON value of text.
Unlike text, this method doesn't throw if the JSON field has an unexpected type.
-
_logprobs
final JsonField<List<ResponseOutputText.Logprob>> _logprobs()
Returns the raw JSON value of logprobs.
Unlike logprobs, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseOutputText.Builder toBuilder()
-
validate
final ResponseOutputText validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ResponseOutputText.Builder builder()
Returns a mutable builder for constructing an instance of ResponseOutputText.
The following fields are required:
.annotations() .text()
-
-
-
-