If the output parsed by ChatAdapter.parse does not include all the fields required by the signature, the lm will be called again up to max_extensions times, with the thus-far completed output added to the input fields for the next generation.
Logic is wrapped up as a decorator to allow the logic to be reused by future Adapers.
Added tests for extended generation.
max_extensions defaults to 1 to maintain current behaviour.
If the output parsed by
ChatAdapter.parse
does not include all the fields required by the signature, the lm will be called again up tomax_extensions
times, with the thus-far completed output added to the input fields for the next generation.Logic is wrapped up as a decorator to allow the logic to be reused by future
Adaper
s.Added tests for extended generation.
max_extensions
defaults to 1 to maintain current behaviour.Linting and formatting changes from ruff.