TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
8.86k stars 697 forks source link

when using it in container mode, it lost the awareness of the actual os and shell #111

Open binaryoak opened 1 year ago

binaryoak commented 1 year ago

for example, I am using macos, yet when I asked the system update commands, it gave me the ones for debian/ubuntu, because this is the env of the docker image.

maybe supporting providing such info in the config files or some env vars?

AnkitGupta17134 commented 1 year ago

How are you sure its referring to base image(linux) of docker to answer regarding update commands?

binaryoak commented 1 year ago

because my os is macos, yet the system update command it gave was apt-get which is for the base image used by python-3-slim -- FROM debian:bullseye-slim

saifmode commented 1 year ago

I addressed this in my fork https://github.com/saifmode/shell_gpt

@TheR1D feel free to cherry pick this commit https://github.com/TheR1D/shell_gpt/commit/cec01d07f186ff5d7fb9d0a4bee1f36648702b9b I also added support for other models in my fork.

@binaryoak Please note, when running a docker build you should also specify your shell. For example, if your Mac is running ZSH, but you're running ShellGPT via docker, it will think you're running PowerShell, and sometimes the chatbot will claim it doesn't know about ZSH. Check the README.md in my fork for more info on how to put the correct OS and shell into your docker container's env vars.

Robinsane commented 2 months ago

I think my PR #540 offers a decent solution to this :)