dm4ml / motion

Framework for building and maintaining self-updating prompts for LLMs
https://dm4ml.github.io/motion/
58 stars 4 forks source link

Support generators in serve ops #284

Closed shreyashankar closed 9 months ago

shreyashankar commented 9 months ago

Description

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.

Related Issues

Closes #283