@@ -63,17 +63,26 @@ public struct GenerationConfig {
63
63
/// The stop sequence will not be included as part of the response.
64
64
public let stopSequences : [ String ] ?
65
65
66
+ /// Output response MIME type of the generated candidate text.
67
+ ///
68
+ /// Supported MIME types:
69
+ /// - `text/plain`: Text output; the default behavior if unspecified.
70
+ /// - `application/json`: JSON response in the candidates.
71
+ public let responseMIMEType : String ?
72
+
66
73
/// Creates a new `GenerationConfig` value.
67
74
///
68
- /// - Parameter temperature: See ``temperature``
69
- /// - Parameter topP: See ``topP``
70
- /// - Parameter topK: See ``topK``
71
- /// - Parameter candidateCount: See ``candidateCount``
72
- /// - Parameter maxOutputTokens: See ``maxOutputTokens``
73
- /// - Parameter stopSequences: See ``stopSequences``
75
+ /// - Parameters:
76
+ /// - temperature: See ``temperature``.
77
+ /// - topP: See ``topP``.
78
+ /// - topK: See ``topK``.
79
+ /// - candidateCount: See ``candidateCount``.
80
+ /// - maxOutputTokens: See ``maxOutputTokens``.
81
+ /// - stopSequences: See ``stopSequences``.
82
+ /// - responseMIMEType: See ``responseMIMEType``.
74
83
public init ( temperature: Float ? = nil , topP: Float ? = nil , topK: Int ? = nil ,
75
84
candidateCount: Int ? = nil , maxOutputTokens: Int ? = nil ,
76
- stopSequences: [ String ] ? = nil ) {
85
+ stopSequences: [ String ] ? = nil , responseMIMEType : String ? = nil ) {
77
86
// Explicit init because otherwise if we re-arrange the above variables it changes the API
78
87
// surface.
79
88
self . temperature = temperature
@@ -82,6 +91,7 @@ public struct GenerationConfig {
82
91
self . candidateCount = candidateCount
83
92
self . maxOutputTokens = maxOutputTokens
84
93
self . stopSequences = stopSequences
94
+ self . responseMIMEType = responseMIMEType
85
95
}
86
96
}
87
97
0 commit comments