Contents

id

A unique id that is stable for the duration of a generated response.

Declaration

var id: GenerationID?

Discussion

A LanguageModelSession produces instances of GeneratedContent that have a non-nil id. When you stream a response, the id is the same for all partial generations in the response stream.

Instances of GeneratedContent that you produce manually with initializers have a nil id because the framework didn’t create them as part of a generation.