Join the Gemini API Developer Competition!
Learn more
google.ai.generativelanguage.Schema
Stay organized with collections
Save and categorize content based on your preferences.
The Schema
object allows the definition of input and output data types.
These types can be objects, but also primitives and arrays.
Represents a select subset of an
OpenAPI 3.0 schema object.
Attributes |
type_
|
google.ai.generativelanguage.Type
Required. Data type.
|
format_
|
str
Optional. The format of the data. This is
used only for primitive datatypes. Supported
formats:
for NUMBER type: float, double
for INTEGER type: int32, int64
|
description
|
str
Optional. A brief description of the
parameter. This could contain examples of use.
Parameter description may be formatted as
Markdown.
|
nullable
|
bool
Optional. Indicates if the value may be null.
|
enum
|
MutableSequence[str]
- Optional. Possible values of the element of Type.STRING with
- enum format. For example we can define an Enum Direction as
- {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH",
"WEST"]}
|
items
|
google.ai.generativelanguage.Schema
Optional. Schema of the elements of
Type.ARRAY.
|
properties
|
MutableMapping[str, google.ai.generativelanguage.Schema]
Optional. Properties of Type.OBJECT.
|
required
|
MutableSequence[str]
Optional. Required properties of Type.OBJECT.
|
Child Classes
class PropertiesEntry
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-14 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]