1414
1515import Foundation
1616
17+ // TODO: Restore `public` to class and methods when determined to be releaseable.
18+
1719/// A chat session that allows for conversation with a model.
1820///
1921/// **Public Preview**: This API is a public preview and may be subject to change.
2022@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
21- public final class TemplateChatSession : Sendable {
23+ final class TemplateChatSession : Sendable {
2224 private let model : TemplateGenerativeModel
2325 private let templateID : String
2426 private let _history : History
@@ -49,7 +51,7 @@ public final class TemplateChatSession: Sendable {
4951 /// request timeout.
5052 /// - Returns: The content generated by the model.
5153 /// - Throws: A ``GenerateContentError`` if the request failed.
52- public func sendMessage( _ content: [ ModelContent ] ,
54+ func sendMessage( _ content: [ ModelContent ] ,
5355 inputs: [ String : Any ] ,
5456 options: RequestOptions = RequestOptions ( ) ) async throws
5557 -> GenerateContentResponse {
@@ -79,7 +81,7 @@ public final class TemplateChatSession: Sendable {
7981 /// request timeout.
8082 /// - Returns: The content generated by the model.
8183 /// - Throws: A ``GenerateContentError`` if the request failed.
82- public func sendMessage( _ message: any PartsRepresentable ,
84+ func sendMessage( _ message: any PartsRepresentable ,
8385 inputs: [ String : Any ] ,
8486 options: RequestOptions = RequestOptions ( ) ) async throws
8587 -> GenerateContentResponse {
@@ -100,7 +102,7 @@ public final class TemplateChatSession: Sendable {
100102 /// request timeout.
101103 /// - Returns: An `AsyncThrowingStream` that yields `GenerateContentResponse` objects.
102104 /// - Throws: A ``GenerateContentError`` if the request failed.
103- public func sendMessageStream( _ content: [ ModelContent ] ,
105+ func sendMessageStream( _ content: [ ModelContent ] ,
104106 inputs: [ String : Any ] ,
105107 options: RequestOptions = RequestOptions ( ) ) throws
106108 -> AsyncThrowingStream < GenerateContentResponse , Error > {
@@ -155,7 +157,7 @@ public final class TemplateChatSession: Sendable {
155157 /// request timeout.
156158 /// - Returns: An `AsyncThrowingStream` that yields `GenerateContentResponse` objects.
157159 /// - Throws: A ``GenerateContentError`` if the request failed.
158- public func sendMessageStream( _ message: any PartsRepresentable ,
160+ func sendMessageStream( _ message: any PartsRepresentable ,
159161 inputs: [ String : Any ] ,
160162 options: RequestOptions = RequestOptions ( ) ) throws
161163 -> AsyncThrowingStream < GenerateContentResponse , Error > {
0 commit comments