Skip to content

Commit d342829

Browse files
committed
Add missing docs
1 parent 543869e commit d342829

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public struct LiveServerMessage: Sendable {
3636
/// The actual message sent from the server.
3737
public var messageType: MessageType
3838

39-
// TODO: document
39+
/// Metadata on the usage of the cached content.
4040
public var usageMetadata: GenerateContentResponse.UsageMetadata? { serverMessage.usageMetadata }
4141
}
4242

FirebaseAI/Sources/Types/Public/Part.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ public struct FunctionCallPart: Part {
147147

148148
public var isThought: Bool { _isThought ?? false }
149149

150+
/// Unique id of the function call. If present, the returned ``FunctionResponsePart``
151+
/// should have a matching `id` field.
150152
public var id: String?
153+
151154
/// Constructs a new function call part.
152155
///
153156
/// > Note: A `FunctionCallPart` is typically received from the model, rather than created
@@ -192,7 +195,7 @@ public struct FunctionResponsePart: Part {
192195
let _isThought: Bool?
193196
let thoughtSignature: String?
194197

195-
// TODO: add docs
198+
/// Matching `id` for a ``FunctionCallPart``, if one was provided.
196199
public var id: String? { functionResponse.id }
197200

198201
/// The name of the function that was called.
@@ -214,7 +217,12 @@ public struct FunctionResponsePart: Part {
214217
)
215218
}
216219

217-
// TODO: add docs for id param
220+
/// Constructs a new `FunctionResponse`.
221+
///
222+
/// - Parameters:
223+
/// - name: The name of the function that was called.
224+
/// - response: The function's response.
225+
/// - id: Matching `id` for a ``FunctionCallPart``, if one was provided.
218226
public init(name: String, response: JSONObject, id: String? = nil) {
219227
self.init(
220228
FunctionResponse(name: name, response: response, id: id),

0 commit comments

Comments
 (0)