streamFromInputStream method
Stream<ChatResult>
streamFromInputStream(
- Stream<
PromptValue> inputStream, { - Options? options,
override
Streams the output of invoking the Runnable on the given inputStream
.
Implementation
@override
Stream<ChatResult> streamFromInputStream(
final Stream<PromptValue> inputStream, {
final Options? options,
}) async* {
final input = await inputStream.toList();
final reduced = reduce<PromptValue>(input);
yield* stream(reduced, options: options);
}