Skip to content

Commit 4782f56

Browse files
qiaodevcopybara-github
authored andcommitted
docs: Improve docs for response_mime_type and response_schema. Relate to #297
PiperOrigin-RevId: 756879867
1 parent e5109a0 commit 4782f56

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/main/java/com/google/genai/types/GenerateContentConfig.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,21 @@ public abstract class GenerateContentConfig extends JsonSerializable {
115115
@JsonProperty("seed")
116116
public abstract Optional<Integer> seed();
117117

118-
/** Output response media type of the generated candidate text. */
118+
/**
119+
* Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`:
120+
* (default) Text output. - `application/json`: JSON response in the candidates. The model needs
121+
* to be prompted to output the appropriate response type, otherwise the behavior is undefined.
122+
* This is a preview feature.
123+
*/
119124
@JsonProperty("responseMimeType")
120125
public abstract Optional<String> responseMimeType();
121126

122-
/** Schema that the generated candidate text must adhere to. */
127+
/**
128+
* The `Schema` object allows the definition of input and output data types. These types can be
129+
* objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema
130+
* object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type
131+
* must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
132+
*/
123133
@JsonProperty("responseSchema")
124134
public abstract Optional<Schema> responseSchema();
125135

0 commit comments

Comments
 (0)