stream method
Streams the output of invoking the Runnable on the given input
.
Implementation
@override
Stream<LLMResult> stream(
final PromptValue input, {
final LLMOptions? options,
}) {
final res = responses[_i++ % responses.length].split('');
return Stream.fromIterable(res).map(
(final item) => LLMResult(
id: 'fake-echo',
output: item,
finishReason: FinishReason.unspecified,
metadata: const {},
usage: const LanguageModelUsage(),
streaming: true,
),
);
}