-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for usage limits #409
Conversation
Deploying pydantic-ai with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise I think this looks great.
a736ed8
to
24ff889
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not done reviewing, but here's a few copy edits on the docs..
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
Once this is merged let's create an issue talking about related improvements we might make:
I don't think we want to do either of those things unconditionally, but it's probably worth creating a tracking issue for discussion about whether/how to make such changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:
- [Ee]rroring
Add
UsageLimits
and raise errors when they are exceeded.This could use more tests before merging, I wouldn't say I'm confident it is working properly in all cases yet. But I'm also not confident enough in the approach to really want to put a lot more effort into testing yet. (Though I'll note I did already add one simple test, and updated the FunctionModel and TestModel to track token counts in the usage.)
Also needs docs.