-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Refactor Pagination: Remove Next URL Field and Update Tests #2045
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
base: main
Are you sure you want to change the base?
Conversation
👋 Hello from RepoBird.ai!I'm the founder of RepoBird.ai, an AI Software Engineer Agent that integrates seamlessly as a GitHub App. This Pull Request was automatically generated by our agent, RepoBirdBot, to address issue #1847. This issue was marked as a Why this PR?
Your Feedback Matters: Please review the proposed changes. If this type of automated contribution isn't suitable for your repository, or if this specific PR isn't helpful, just let me know! I'll close it, make any improvements and unlist these PRs – no worries. Interested in learning more?
Thank you! |
Hi @RepoBirdBot! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
I've signed the cla hopefully this updates. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
No idea how to fix the precommit issue - when I run it nothing seems to happen. Am I supposed to run it on my last commit? |
Yes it was fixed in 293d95b please rebase. |
…erver/server.py, tests/integration/datasets/test_datasets.py): enhance pagination response with next URL Add an optional URL field to the PaginatedResponse model to facilitate pagination in API responses. Update the server logic to populate this URL based on the current request parameters when more data is available. Enhance tests to verify the presence and correctness of the URL in pagination scenarios.
This PR removes the optional URL field from the PaginatedResponse model along with the associated logic for generating the next page URL. The changes include:
url
attribute and its documentation from the PaginatedResponse model inllama_stack/apis/common/responses.py
.llama_stack/distribution/server/server.py
that computed and assigned the next page URL based on request parameters. The logic to generate a next page URL whenhas_more
is true has been removed from the server route handler.tests/integration/datasets/test_datasets.py
by removing assertions related to theurl
field from the pagination response.These changes simplify the pagination implementation and align the test expectations with the current behavior of the PaginatedResponse. This refactoring closes #1847.
Please review the modifications and let me know if further adjustments are needed.
Created with Repobird.ai 📦🐦