Class ResponseOutputText
-
- All Implemented Interfaces:
public final class ResponseOutputText
A text output from the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseOutputText.Builder
A builder for ResponseOutputText.
public final class
ResponseOutputText.Annotation
A citation to a file.
public final class
ResponseOutputText.Logprob
The log probability of a token.
-
Method Summary
Modifier and Type Method Description final List<ResponseOutputText.Annotation>
annotations()
The annotations of the text output. final String
text()
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.Builder
toBuilder()
final ResponseOutputText
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseOutputText.Builder
builder()
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()
-
builder
final static ResponseOutputText.Builder builder()
Returns a mutable builder for constructing an instance of ResponseOutputText.
The following fields are required:
.annotations() .text()
-
-
-
-