@@ -38,9 +38,8 @@ public final class LiveSession: Sendable {
38
38
///
39
39
/// - Parameters:
40
40
/// - responses: Client generated function results, matched to their respective
41
- /// ``FunctionCallPart`` by the `id` field.
41
+ /// ``FunctionCallPart`` by the `id` field.
42
42
public func functionResponses( _ responses: [ FunctionResponsePart ] ) async {
43
- // TODO: what happens if you send an empty list lol
44
43
let message = BidiGenerateContentToolResponse (
45
44
functionResponses: responses. map { $0. functionResponse }
46
45
)
@@ -55,7 +54,7 @@ public final class LiveSession: Sendable {
55
54
///
56
55
/// - Parameters:
57
56
/// - audio: Raw 16-bit PCM audio at 16Hz, used to update the model on the client's
58
- /// conversation.
57
+ /// conversation.
59
58
public func sendAudioRealtime( audio: Data ) async {
60
59
// TODO: (b/443984790) address when we add RealtimeInputConfig support
61
60
let message = BidiGenerateContentRealtimeInput (
@@ -97,9 +96,8 @@ public final class LiveSession: Sendable {
97
96
/// - Parameters:
98
97
/// - content: Content to append to the current conversation with the model.
99
98
/// - turnComplete: Whether the server should start generating content with the currently
100
- /// accumulated prompt, or await
101
- /// additional messages before starting generation. By default, the server will await additional
102
- /// messages.
99
+ /// accumulated prompt, or await additional messages before starting generation. By default,
100
+ /// the server will await additional messages.
103
101
public func sendContent( _ content: [ ModelContent ] , turnComplete: Bool ? = nil ) async {
104
102
let message = BidiGenerateContentClientContent ( turns: content, turnComplete: turnComplete)
105
103
await service. send ( . clientContent( message) )
@@ -116,12 +114,10 @@ public final class LiveSession: Sendable {
116
114
///
117
115
/// - Parameters:
118
116
/// - content: Content to append to the current conversation with the model (see
119
- /// ``PartsRepresentable`` for
120
- /// conforming types).
117
+ /// ``PartsRepresentable`` for conforming types).
121
118
/// - turnComplete: Whether the server should start generating content with the currently
122
- /// accumulated prompt, or await
123
- /// additional messages before starting generation. By default, the server will await additional
124
- /// messages.
119
+ /// accumulated prompt, or await additional messages before starting generation. By default,
120
+ /// the server will await additional messages.
125
121
public func sendContent( _ parts: any PartsRepresentable ... ,
126
122
turnComplete: Bool ? = nil ) async {
127
123
await sendContent ( [ ModelContent ( parts: parts) ] , turnComplete: turnComplete)
0 commit comments