mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
This PR adds a model call limit middleware that helps to manage: * number of model calls during a run (helps w/ avoiding tool calling loops) - implemented w/ `UntrackedValue` * number of model calls on a thread (helps w/ avoiding lengthy convos) - standard state Concern here is w/ other middlewares overwriting the model call count... we could use a `_` prefixed field?