@@ -76,6 +76,13 @@ public struct GenerationConfig {
76
76
/// this is limited to `application/json`.
77
77
public let responseSchema : Schema ?
78
78
79
+ /// Array of output response modalities
80
+ ///
81
+ /// Supported modalities:
82
+ /// - `text`: Text output
83
+ /// - `image`: Image output
84
+ public let responseModalities : [ String ] ?
85
+
79
86
/// Creates a new `GenerationConfig` value.
80
87
///
81
88
/// - Parameters:
@@ -87,10 +94,11 @@ public struct GenerationConfig {
87
94
/// - stopSequences: See ``stopSequences``.
88
95
/// - responseMIMEType: See ``responseMIMEType``.
89
96
/// - responseSchema: See ``responseSchema``.
97
+ /// - responseModalities: See ``responseModalities``.
90
98
public init ( temperature: Float ? = nil , topP: Float ? = nil , topK: Int ? = nil ,
91
99
candidateCount: Int ? = nil , maxOutputTokens: Int ? = nil ,
92
100
stopSequences: [ String ] ? = nil , responseMIMEType: String ? = nil ,
93
- responseSchema: Schema ? = nil ) {
101
+ responseSchema: Schema ? = nil , responseModalities : [ String ] ? = nil ) {
94
102
// Explicit init because otherwise if we re-arrange the above variables it changes the API
95
103
// surface.
96
104
self . temperature = temperature
@@ -101,6 +109,7 @@ public struct GenerationConfig {
101
109
self . stopSequences = stopSequences
102
110
self . responseMIMEType = responseMIMEType
103
111
self . responseSchema = responseSchema
112
+ self . responseModalities = responseModalities
104
113
}
105
114
}
106
115
0 commit comments