Axlfc / UE5-python

🐍 Code to test Python Unreal Engine 5 capabilites, Blender & HoudiniFX scripts for testing, a twitter bot, reddit script and ChatGPT, DALL-E & other open-source text and image generation models scripts and utilities.
29 stars 9 forks source link

After leaving search prompt, chatGPT changes the folder #2

Closed aramacs closed 1 year ago

aramacs commented 1 year ago

Hey Axlfc, Find another behavior to fix I guess. I follow the Content instalation. So when I call chatGPT from terminal everything goes fine. But when I'm exit with it changes my terminal prompt from the folder I'm in to chatGPT/Content/Python/chatGPT.

chatGPT_error

Axlfc commented 1 year ago

This happenned because the bash function in customizer didn't run inside a subshell. Now this problem is solved. The solution was to run the cd inside () to avoid changing path when interrupted execution.

imagen

Adding the parenthesis in this code protecting the cd fixed this issue.

Make sure to update Linux-Auto-Customizer repository folder in chatGPT_feature branch: git pull To refresh the changes.

Save your .env file with the API key in a safe place before re-install so you don't lose it, and paste it back after the installation. With a copy of .env file in safe place, now you can try to reinstall the feature, to do so re-run the install.sh script as you did the first time after pulling the last changes from the repository.

After the git pull command, run again: bash src/core/install.sh -v -o -f chatGPT

Paste back the .env file in ~/.customizer/bin/chatGPT/Content/Python/chatBot directory and everything should work fine now.

Thanks a lot for letting me know and for the help in test!!

aramacs commented 1 year ago

Great Axlfc! I tested and it was fixed. Keep going use it.