-
Notifications
You must be signed in to change notification settings - Fork 21
add utility to get installed libraries #373
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
| if method.upper() == "POST": | ||
| assert payload is not None, "Payload must be provided for POST requests" | ||
| if self.installed_packages: | ||
| payload["installed_packages"] = self.installed_packages |
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.
which backend request would it be for?
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.
I had made this a long time ago but the idea is that it should allow the optimization to be more "agentic", by having context on which library are available it could take advantage of faster libraries that exist in the environment, this could go as an extra optimization generated during the initial /optimizer requests
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.
this is a problem because we can use a library like polars which is faster than pandas in a few contexts and still be "correct" but we will not accept it due to the types of the objects
I had even been thinking about this issue for a while but you've implemented a fix for this in during code repair I believe
cc: @misrasaurabh1
User description
this is for future use
I'm not going to integrate it with the full context yet because our current implementation expects objects to be the same when comparing, this is a problem because we can use a library like polars which is faster than pandas in a few contexts and still be "correct" but we will not accept it due to the types of the objects
PR Type
Enhancement
Description
Add utility to list installed Python packages
Filter out blacklisted development packages
Integrate installed_packages into AI POST payloads
Add type hints to contextmanager functions
Changes walkthrough 📝
aiservice.py
Add installed packages support to AI clientcodeflash/api/aiservice.py
code_utils.py
Implement installed packages retrieval utilitycodeflash/code_utils/code_utils.py