Skip to content

[Firebase AI] Make GenerativeAIRequest.Response Sendable #14947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add explicit Sendable conformance to remaining responses
  • Loading branch information
andrewheard committed Jun 9, 2025
commit cb0ead3889ea4010ed0a7b728c74e5e23f100ae7
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension CountTokensRequest: GenerativeAIRequest {

/// The model's response to a count tokens request.
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
public struct CountTokensResponse {
public struct CountTokensResponse: Sendable {
/// The total number of tokens in the input given to the model as a prompt.
public let totalTokens: Int

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Foundation
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
// TODO(#14451): Re-add "- ``ImagenModel/generateImages(prompt:gcsURI:)`` where `T` is
// ``ImagenGCSImage``" in the DocC above.
public struct ImagenGenerationResponse<T> {
public struct ImagenGenerationResponse<T>: Sendable where T: Sendable {
/// The images generated by Imagen; see ``ImagenInlineImage``.
///
/// > Important: The number of images generated may be fewer than the number requested if one or
Expand Down
Loading