-
Notifications
You must be signed in to change notification settings - Fork 0
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
ISS-273 - System footprint #99
base: main
Are you sure you want to change the base?
Conversation
* Get the list of global packages installed on the system for mnetrics. | ||
*/ | ||
function getGlobalPackages() { | ||
try { |
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 think we should expand it to brew
, apt
and a few other most popular package managers.
Python version would also be very useful
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.
What else could be useful to decrease the amount of iterations when it comes to CLI commands 2501 needs to run?
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 100% sure apt is very interesting tbh, but brew, python, php?, rust?,ruby? why not
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.
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.
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.
yeah, tree
could be interesting if we manage to:
- list the main folders
- cut the list down to X main folders
- list full paths
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.
apt : apt list --installed
looks interesting indeed, I thought you wanted to have for ex the apt version
tree:
- I use it often its handy, I've always had in mind to add it in the context somehow if relevant.
- Since its a utility like JQ, we could code a function that would output the same kind of display. Its easy (already did in the past) and as bonus we could re-used the existing methods to retrieve workspace files to ignore common vendor folders etc. Which would output a righteously filtered list of files, with a preferably configured max depth.
wdyt ?
@zhuk-aa I did a package manager call system that fetches user installed packages, since we dont need to know the common installed packages on the user's machine as the AI will surely know it already. Using this approach gives less packages than output all the packages, which can lead to having 200+ items. Now it gives something like :
wdyt ? |
src/utils/tree.ts
Outdated
const entries = Array.from(node.children.values()); | ||
const lastIndex = entries.length - 1; | ||
|
||
entries.forEach((child, index) => { |
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.
- my gut feeling: full paths would be a lot more clear for LLMs than this kind of visualization
- generation logic would be simpler.
- if later we'll need to change it to folders not nested inside the workspace it would be easier to do
wdyt?
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.
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.
Adding sysinfo adds around 800 tokens, and adding the filetree with relative path adds up another ~1500 tokens on engine for example:
src/validation/chatSchema.ts
src/validation/configurationsSchema.ts
src/validation/containerSchema.ts
src/validation/fileSchema.ts
src/validation/jobsSchema.ts
tsconfig.build.json
tsconfig.json
types/express.d.ts
types/stream.d.ts
vercel.json
[DEBUG][09:41:42.382] Final prompt tokens : 564 <- without any additions
[DEBUG][09:41:42.385] Final prompt with sysinfo tokens: 1313
[DEBUG][09:41:42.392] Final prompt with workspaceFileTree tokens: 2791
/** | ||
* Collect system info while respecting privacy. | ||
*/ | ||
export type SystemInfo = { |
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.
My thinking: it would be better to keep this type loose. So that we could add or remove info without changes in Engine (and without thinking of backwards compatibility)
{
system: string, // 'platform, type, release, arch' all in one string
installed_packages: string[], // including node packages
package_manager: string[], // we can skip adding it now if it's too much work
nodeVersion: string
}
but let's chat about it
🚀 Pull Request Overview
What does this PR do? 🤔
add CLI System footprint