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