Skip to content

Commit 6553b5a

Browse files
committed
Update some doc formatting
1 parent 279b733 commit 6553b5a

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

FirebaseAI/Sources/Types/Public/Live/LiveServerGoAway.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Foundation
2121
public struct LiveServerGoAway: Sendable {
2222
let goAway: GoAway
2323
/// The remaining time before the connection will be terminated as ABORTED.
24+
///
2425
/// The minimal time returned here is specified differently together with
2526
/// the rate limits for a given model.
2627
public var timeLeft: TimeInterval? { goAway.timeLeft?.timeInterval }

FirebaseAI/Sources/Types/Public/Live/LiveServerToolCall.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
/// Request for the client to execute the provided ``functionCalls``.
1616
///
1717
/// The client should return matching ``FunctionResponsePart``, where the `id` fields correspond to
18-
/// individual
19-
/// ``FunctionCallPart``s.
18+
/// individual ``FunctionCallPart``s.
2019
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2120
public struct LiveServerToolCall: Sendable {
2221
let serverToolCall: BidiGenerateContentToolCall

FirebaseAI/Sources/Types/Public/Live/LiveServerToolCallCancellation.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
public struct LiveServerToolCallCancellation: Sendable {
2121
let serverToolCallCancellation: BidiGenerateContentToolCallCancellation
2222
/// A list of `id`s matching the `id` provided in a previous ``LiveServerToolCall``, where only
23-
/// the provided `id`s should
24-
/// be cancelled.
23+
/// the provided `id`s should be cancelled.
2524
public var ids: [String]? { serverToolCallCancellation.ids }
2625

2726
init(_ serverToolCallCancellation: BidiGenerateContentToolCallCancellation) {

FirebaseAI/Sources/Types/Public/Live/LiveSession.swift

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ public final class LiveSession: Sendable {
3838
///
3939
/// - Parameters:
4040
/// - responses: Client generated function results, matched to their respective
41-
/// ``FunctionCallPart`` by the `id` field.
41+
/// ``FunctionCallPart`` by the `id` field.
4242
public func functionResponses(_ responses: [FunctionResponsePart]) async {
43-
// TODO: what happens if you send an empty list lol
4443
let message = BidiGenerateContentToolResponse(
4544
functionResponses: responses.map { $0.functionResponse }
4645
)
@@ -55,7 +54,7 @@ public final class LiveSession: Sendable {
5554
///
5655
/// - Parameters:
5756
/// - audio: Raw 16-bit PCM audio at 16Hz, used to update the model on the client's
58-
/// conversation.
57+
/// conversation.
5958
public func sendAudioRealtime(audio: Data) async {
6059
// TODO: (b/443984790) address when we add RealtimeInputConfig support
6160
let message = BidiGenerateContentRealtimeInput(
@@ -97,9 +96,8 @@ public final class LiveSession: Sendable {
9796
/// - Parameters:
9897
/// - content: Content to append to the current conversation with the model.
9998
/// - 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.
103101
public func sendContent(_ content: [ModelContent], turnComplete: Bool? = nil) async {
104102
let message = BidiGenerateContentClientContent(turns: content, turnComplete: turnComplete)
105103
await service.send(.clientContent(message))
@@ -116,12 +114,10 @@ public final class LiveSession: Sendable {
116114
///
117115
/// - Parameters:
118116
/// - content: Content to append to the current conversation with the model (see
119-
/// ``PartsRepresentable`` for
120-
/// conforming types).
117+
/// ``PartsRepresentable`` for conforming types).
121118
/// - 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.
125121
public func sendContent(_ parts: any PartsRepresentable...,
126122
turnComplete: Bool? = nil) async {
127123
await sendContent([ModelContent(parts: parts)], turnComplete: turnComplete)

0 commit comments

Comments
 (0)