@@ -55,7 +55,7 @@ public final class GenerativeModel {
55
55
/// - safetySettings: A value describing what types of harmful content your model should allow.
56
56
/// - tools: A list of ``Tool`` objects that the model may use to generate the next response.
57
57
/// - systemInstruction: Instructions that direct the model to behave a certain way; currently
58
- /// only text content is supported.
58
+ /// only text content is supported, e.g., "You are a cat. Your name is Neko."
59
59
/// - toolConfig: Tool configuration for any `Tool` specified in the request.
60
60
/// - requestOptions Configuration parameters for sending requests to the backend.
61
61
public convenience init ( name: String ,
@@ -64,7 +64,7 @@ public final class GenerativeModel {
64
64
safetySettings: [ SafetySetting ] ? = nil ,
65
65
tools: [ Tool ] ? = nil ,
66
66
toolConfig: ToolConfig ? = nil ,
67
- systemInstruction: any ThrowingPartsRepresentable ... ,
67
+ systemInstruction: String ,
68
68
requestOptions: RequestOptions = RequestOptions ( ) ) {
69
69
self . init (
70
70
name: name,
@@ -73,7 +73,7 @@ public final class GenerativeModel {
73
73
safetySettings: safetySettings,
74
74
tools: tools,
75
75
toolConfig: toolConfig,
76
- systemInstruction: try ? ModelContent ( role: " system " , parts: systemInstruction) ,
76
+ systemInstruction: ModelContent ( role: " system " , parts: systemInstruction) ,
77
77
requestOptions: requestOptions,
78
78
urlSession: . shared
79
79
)
@@ -89,7 +89,8 @@ public final class GenerativeModel {
89
89
/// - safetySettings: A value describing what types of harmful content your model should allow.
90
90
/// - tools: A list of ``Tool`` objects that the model may use to generate the next response.
91
91
/// - systemInstruction: Instructions that direct the model to behave a certain way; currently
92
- /// only text content is supported.
92
+ /// only text content is supported, e.g.,
93
+ /// `ModelContent(role: "system", parts: "You are a cat. Your name is Neko.")`.
93
94
/// - toolConfig: Tool configuration for any `Tool` specified in the request.
94
95
/// - requestOptions Configuration parameters for sending requests to the backend.
95
96
public convenience init ( name: String ,
0 commit comments