generateObject
Generates an object from the input Content given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Generates an object from the text input given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The text to be send to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Generates an object from the input Content given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Generates an object from the text input given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The text to be send to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Generates an object from the input Content given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Generates an object from the text input given to the model as a prompt.
Note for Structured Output:
For on-device and hybrid inference (
ONLY_ON_DEVICE,PREFER_ON_DEVICE, andPREFER_IN_CLOUD): Requires using the@Generableannotation on adata class. Manual schemas are not supported.For cloud-only inference (
ONLY_IN_CLOUD): Supports both@Generableannotations (recommended) and manual schemas.
Return
The content generated by the model.
Parameters
A schema for the output
The text to be send to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.