streamResponse(to:options:)
Produces a response stream to a prompt.
Declaration
final func streamResponse(to prompt: Prompt, options: GenerationOptions = GenerationOptions()) -> sending LanguageModelSession.ResponseStream<String>Parameters
- prompt:
A prompt for the model to respond to.
- options:
Options that control how tokens are sampled from the distribution the model produces.
Return Value
A response stream that produces aggregated tokens.