runStreaming method
Streams the overall system execution.
Implementation
Stream<VanturaResponse> runStreaming(
String prompt, {
CancellationToken? cancellationToken,
}) async* {
final stream = activeAgent.runStreaming(
prompt,
cancellationToken: cancellationToken,
);
await for (final response in stream) {
yield response;
}
// Process any transfer requested during streaming
if (_pendingTransfer != null) {
activeAgent = agents[_pendingTransfer]!;
_pendingTransfer = null;
}
}