Răsfoiți Sursa

docs(ai logic): Add docs callout 'LiveServerMessage.Payload' enum (#15395)

Nick Cooke 5 luni în urmă
părinte
comite
2422c716b0

+ 4 - 0
FirebaseAI/Sources/Types/Public/Live/LiveServerMessage.swift

@@ -19,6 +19,10 @@ public struct LiveServerMessage: Sendable {
   let serverMessage: BidiGenerateContentServerMessage
 
   /// 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.
   public enum Payload: Sendable {
     /// Content generated by the model in response to client messages.
     case content(LiveServerContent)