@@ -97,17 +97,17 @@ public final class GenerativeModel {
9797 }
9898
9999 /// Generates content from String and/or image inputs, given to the model as a prompt, that are
100- /// representable as one or more ``ModelContent/ Part``s.
100+ /// representable as one or more ``Part``s.
101101 ///
102- /// Since ``ModelContent/Part``s do not specify a role, this method is intended for generating
103- /// content from
102+ /// Since ``Part``s do not specify a role, this method is intended for generating content from
104103 /// [zero-shot](https://developers.google.com/machine-learning/glossary/generative#zero-shot-prompting)
105104 /// or "direct" prompts. For
106105 /// [few-shot](https://developers.google.com/machine-learning/glossary/generative#few-shot-prompting)
107- /// prompts, see `generateContent(_ content: @autoclosure () throws -> [ModelContent])`.
106+ /// prompts, see `generateContent(_ content: [ModelContent])`.
108107 ///
109- /// - Parameter content: The input(s) given to the model as a prompt (see ``PartsRepresentable``
110- /// for conforming types).
108+ /// - Parameters:
109+ /// - parts: The input(s) given to the model as a prompt (see ``PartsRepresentable`` for
110+ /// conforming types).
111111 /// - Returns: The content generated by the model.
112112 /// - Throws: A ``GenerateContentError`` if the request failed.
113113 public func generateContent( _ parts: any PartsRepresentable ... )
@@ -153,17 +153,17 @@ public final class GenerativeModel {
153153 }
154154
155155 /// Generates content from String and/or image inputs, given to the model as a prompt, that are
156- /// representable as one or more ``ModelContent/ Part``s.
156+ /// representable as one or more ``Part``s.
157157 ///
158- /// Since ``ModelContent/Part``s do not specify a role, this method is intended for generating
159- /// content from
158+ /// Since ``Part``s do not specify a role, this method is intended for generating content from
160159 /// [zero-shot](https://developers.google.com/machine-learning/glossary/generative#zero-shot-prompting)
161160 /// or "direct" prompts. For
162161 /// [few-shot](https://developers.google.com/machine-learning/glossary/generative#few-shot-prompting)
163162 /// prompts, see `generateContentStream(_ content: @autoclosure () throws -> [ModelContent])`.
164163 ///
165- /// - Parameter content: The input(s) given to the model as a prompt (see
166- /// ``PartsRepresentable`` for conforming types).
164+ /// - Parameters:
165+ /// - parts: The input(s) given to the model as a prompt (see ``PartsRepresentable`` for
166+ /// conforming types).
167167 /// - Returns: A stream wrapping content generated by the model or a ``GenerateContentError``
168168 /// error if an error occurred.
169169 @available ( macOS 12 . 0 , * )
@@ -228,21 +228,20 @@ public final class GenerativeModel {
228228 }
229229
230230 /// Runs the model's tokenizer on String and/or image inputs that are representable as one or more
231- /// ``ModelContent/ Part``s.
231+ /// ``Part``s.
232232 ///
233- /// Since ``ModelContent/ Part``s do not specify a role, this method is intended for tokenizing
233+ /// Since ``Part``s do not specify a role, this method is intended for tokenizing
234234 /// [zero-shot](https://developers.google.com/machine-learning/glossary/generative#zero-shot-prompting)
235235 /// or "direct" prompts. For
236236 /// [few-shot](https://developers.google.com/machine-learning/glossary/generative#few-shot-prompting)
237237 /// input, see `countTokens(_ content: @autoclosure () throws -> [ModelContent])`.
238238 ///
239- /// - Parameter content: The input(s) given to the model as a prompt (see ``PartsRepresentable``
240- /// for conforming types).
239+ /// - Parameters:
240+ /// - parts: The input(s) given to the model as a prompt (see ``PartsRepresentable`` for
241+ /// conforming types).
241242 /// - Returns: The results of running the model's tokenizer on the input; contains
242243 /// ``CountTokensResponse/totalTokens``.
243- /// - Throws: A ``CountTokensError`` if the tokenization request failed.
244- public func countTokens( _ parts: any PartsRepresentable ... ) async throws
245- -> CountTokensResponse {
244+ public func countTokens( _ parts: any PartsRepresentable ... ) async throws -> CountTokensResponse {
246245 return try await countTokens ( [ ModelContent ( parts: parts) ] )
247246 }
248247
@@ -251,10 +250,7 @@ public final class GenerativeModel {
251250 /// - Parameter content: The input given to the model as a prompt.
252251 /// - Returns: The results of running the model's tokenizer on the input; contains
253252 /// ``CountTokensResponse/totalTokens``.
254- /// - Throws: A ``CountTokensError`` if the tokenization request failed or the input content was
255- /// invalid.
256- public func countTokens( _ content: [ ModelContent ] ) async throws
257- -> CountTokensResponse {
253+ public func countTokens( _ content: [ ModelContent ] ) async throws -> CountTokensResponse {
258254 let countTokensRequest = CountTokensRequest (
259255 model: modelResourceName,
260256 contents: content,
0 commit comments