FirebaseAILogic Framework Reference

LiveServerMessage

@available(iOS 15.0, macOS 12.0, tvOS 15.0, *)
@available(watchOS, unavailable)
public struct LiveServerMessage : Sendable

Update from the server, generated from the model in response to client messages.

  • The type of message sent from the server.

    Important

    Potential future additions to the Payload enum may not trigger a semantic versioning major version update. If ensure forward compatibility, client code should avoid exhaustive switch statements over this enum by adding a default case.

    Declaration

    Swift

    public enum Payload : Sendable
  • The message sent from the server.

    Declaration

    Swift

    public let payload: Payload
  • Metadata on the usage of the cached content.

    Declaration

    Swift

    public var usageMetadata: GenerateContentResponse.UsageMetadata? { get }