This PR introduces the gen and agen component instance methods, which allow users to define serve ops that are generator functions. We also add 2 tests to make sure that even when generated results are cached, motion returns the results as the expected iterable.
Description
This PR introduces the
gen
andagen
component instance methods, which allow users to define serve ops that are generator functions. We also add 2 tests to make sure that even when generated results are cached, motion returns the results as the expected iterable.Related Issues
Closes #283