Adds TokenLimitReachedException for providers#203
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
felixarntz
left a comment
There was a problem hiding this comment.
LGTM! Just one thing to fix pre merge.
| * exceeds the allowed limit, whether that is the model's context window | ||
| * or a configured maximum. | ||
| * | ||
| * @since 0.4.0 |
There was a problem hiding this comment.
Use n.e.x.t throughout the PR
|
@JasonTheAdams here is explanation for the parameters that I added in #194 I added The idea for The idea for |
|
Thanks for the context, @saarnilauri! Those do make sense, but feel a bit nice-to-have at the moment. Let's start simple and gather more feedback over time. |
Summary
or a configured token maximum
inspect the limit that was hit (e.g., to retry with a shorter prompt or surface a meaningful error to end
users)
This is a smaller follow up to #194, as the providers are no longer bundled. I didn't bring over all the parameters for the exception in that PR because I wasn't sure what they were all for. Happy to add them back if there's strong reasoning!