Skip to content
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

Added a way to send the OS to chatGPT #9

Closed
wants to merge 3 commits into from

Conversation

Ultra980
Copy link

@Ultra980 Ultra980 commented Feb 9, 2023

For some commands, such as updating the system, chatGPT might need to know what OS the user is running. That is why I added an argument (--send-os-info, shortened to -o) to send some information to chatGPT. It sends the OS (Linux, Darwin or Windows), the version (kernel version on Linux, release on Windows), and, if on Linux, it also sends the distribution name (e.g. opensuse-tumbleweed).

@Ultra980 Ultra980 changed the title Added a way to send th OS to chatGPT Added a way to send the OS to chatGPT Feb 9, 2023
@Ultra980
Copy link
Author

Ultra980 commented Feb 9, 2023

I also wanted to make this project, but never got to it. This was one of the features I had planned in my mind, but since you already made the project, I'd rather contribute to a standard, not make a new one :)

@Ultra980
Copy link
Author

Ultra980 commented Feb 9, 2023

I tried it on my machine and realized I had forgotten to add the dependencies and the fact that in python variables can't have - in their names. It's now fixed. I confirmed by running it:

$ sgpt -seo 'Update the system'
sudo zypper update
Execute shell command? [y/N]: y

However, it seems to not know the fact the while zypper up works, it can lead to partial upgrades on Tumbleweed, so it should use zypper dup. I don't know whether this is from the prompt or from the AI. Also, it then tried to use yum, which is not the recommended package manager. Is there a way to tell it what package manager and upgrade command the system uses?

I should make a python library for that.

@TheR1D
Copy link
Owner

TheR1D commented Feb 11, 2023

Hey, thank you for the PR, I left comment with my thought #10 (comment)

@TheR1D TheR1D closed this Feb 11, 2023
@Ultra980 Ultra980 deleted the patch-1 branch February 11, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants