Using AI to create package.yml files #435
Replies: 14 comments 24 replies
-
I’m sure it’s possible. However I think we could get better results from just implementing a ruby script to translate Homebrew pkgs. Though the AI approach is potentially WAY LESS work. Longer term we want our package.yml format to be something pkg authors include in their repos so this effort stops getting duplicated. |
Beta Was this translation helpful? Give feedback.
-
I've thought of writing a formula parser also. In fact, I kind of started one but Ruby is towards the bottom of my experience list (I learned it but then never used it...). So I wrote a parser in Perl but didn't get very far. I sent an email to surgehq.ai and told them what I wanted to do and asked for a quote. I had Marc's email so I CC'ed him. I'm curious what they'll quote me. I know they have free tiers, so yeah, it will be interesting to see what they say. I almost want to do this more because I'm dying to know if it will work. |
Beta Was this translation helpful? Give feedback.
-
SurgeHQ got back to me and said they are looking for annual customers. So basically "no". I just applied to the GPT-4 waitlist. With 32,000 context tokens, I bet it can do this. I'm going to start cleaning up the brew files and removing stuff that doesn't really convert over (like bottle hashes). Also, FYI, I'm planning on taking some extended "vacation" from my day job in April to work on this. I'm hoping to also package up stable-diffusion and llama on that same vacation. |
Beta Was this translation helpful? Give feedback.
-
@mfts I figured out how to get gpt-4 access (by paying/using my free trial). I wanted to try this out. I am thinking of trying this tomorrow. I was hoping you could send me the prompt you used. |
Beta Was this translation helpful? Give feedback.
-
Behold: https://github.com/magnusviri/convert2tea I used covert2tea to create this: pkgxdev/pantry#890. I had to edit it by hand a little bit. Besides the fact that I spent almost all day writing convert2tea, it saved me a lot of mental thought. And it's AI coolness! Ugh, I did that without any breaks. I need a long break to process this new turn of events. |
Beta Was this translation helpful? Give feedback.
-
Does anybody has a GPT-4 access ? |
Beta Was this translation helpful? Give feedback.
-
I'll give a try to https://github.com/magnusviri/convert2tea on : |
Beta Was this translation helpful? Give feedback.
-
Well, I've populated a script with about 200 formula from the top 300 list and it's creating multiple versions of each package and saving them. They're all over the place. Some are ok, some are garbage, and some are "I'm sorry but as an AI language model..." There's no way I can actually run I'm going to run it all night and see if I run out of trial money. I might just create a repo of the package files if people want to look at them. I don't have gpt-4 access, only gpt-3.5. I'm not sure if gpt-4 would do a better job. One thing I quickly noticed is that this thing can't go find github urls if the original recipe lists something else. So I think cleanup is unavoidable. At least a lot of the grunt work is done though. IDK, it seems to me that clean up is easier than staring at a template package.yml file. On the bright side, I can rest assured that AI isn't going to replace me any time soon! LOL. |
Beta Was this translation helpful? Give feedback.
-
I've updated my repo with all the changes I've done the last day, and I've added the output, which includes 105 projects. It's kind of messy in those project folders. I've also been tweaking stuff as I go along, so later projects might look slightly differently than the first projects. I've submitted a pull request for the first one on that list, abseil.io, so I've removed that from the output (before I did the push). |
Beta Was this translation helpful? Give feedback.
-
I've gone through the first round of converting about 240 of the top 300. I've only looked at the first one and it needed a lot of work. Anyway, if anyone wants to look, the output is here and there's 1255 files (yml files and I saved the prompts too). |
Beta Was this translation helpful? Give feedback.
-
Oh, and it only cost me $4 (I've still got $14 left from my trial lol). |
Beta Was this translation helpful? Give feedback.
-
Maybe it's time to set AutoGPT on it? |
Beta Was this translation helpful? Give feedback.
-
Ha, I scrolled down to type "AutoGPT" |
Beta Was this translation helpful? Give feedback.
-
I'm thinking. As I process the AI generated yml files, I've noticed something. The AI seems to hallucinate some ideas that might actually be a good idea. For example, here's one.
|
Beta Was this translation helpful? Give feedback.
-
I've been studying AI and I wondered if it would be possible to fine tune a large language model with the differences between the existing tea package.yml files with the equivalent Homebrew, yum, apt, and Chocolately formula. Then feed the model all of the formula that it doesn't already have to produce package.yml files. My AI knowledge is superficial, so I have no idea how to do this, but I'm going to start learning, just in case someone else way smarter than me doesn't just decide to do it over the weekend or something like that.
Beta Was this translation helpful? Give feedback.
All reactions