guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
18.13k stars 1.01k forks source link

[Bug] `sequence()` not quite replacement for `zero_or_more()` #932

Open riedgar-ms opened 5 days ago

riedgar-ms commented 5 days ago

The bug

For some reason, sequence() (introduced in #927) is not a full drop-in replacement for zero_or_more(), even though it should be. One of the tests using Mock fails in a test which constrains the number of tokens generated. All others have been substituted without issue.

To Reproduce

In _sequences.py change zero_or_more() to be a wrapper for sequence()

System info (please complete the following information):