Class StreamBuilder
Fluent builder for streaming structured output. Created by BeginStream(string).
var run = service.BeginStream(prompt)
.WithStructuredOutput(new StructuredOutputPolicy { MaxRepairAttempts = 2 })
.As<MyDto>();
public class StreamBuilder
- Inheritance
-
StreamBuilder
- Inherited Members
Methods
As<T>()
Begin a streaming run that will deserialize the final result to T.
The stream starts immediately in the background.
public StructuredStreamRun<T> As<T>() where T : class
Returns
Type Parameters
TThe target POCO type to deserialize to.
WithStructuredOutput(StructuredOutputPolicy)
Configure structured output policy for this streaming run. If not called, the service-level StructuredOutputMaxRetries is used.
public StreamBuilder WithStructuredOutput(StructuredOutputPolicy policy)
Parameters
policyStructuredOutputPolicy