EN: [VSCode Extension: Let GPT config your python environment.] https://youtu.be/Be3Vl3ay0m0
CN: 【VSCode 插件: 让 GPT 替你配置 python 环境】 https://www.bilibili.com/video/BV156KBzwEjX
This plugin uses pip to install packages within a Conda environment, defaulting to the base environment. After the plugin is deployed, please select the corresponding Conda environment or create a new environment from the bottom-right corner.
- Complete Imports: Completes imports in a single Python file.
- Auto Config: Utilizes a large language model to automatically install Python packages with pip.
- Environment Debug(RECOMMENDED): Automatically runs the Python file. If errors occur, the large language model suggests how to set up the environment and executes the returned commands. The debug loop runs up to 3 times.
- Generate requirements.txt (Explore Folder). Warning: This operation will generate and replace the
requirements.txtfile(with a backup of previous one) in the selected folder for.pyfiles in all subdirectories.
git clone <repository-url>
cd <project-directory>
npm install
code .run it with F5 in vscode.
- OpenAI key (Current model: gpt-3.5-turbo-1106, you can choose prefered model in Settings, but it might lead to errors due to different api.)
- Conda
Open VSCode.
Navigate to File > Preferences > Settings (or press Ctrl + , / Cmd + ,). Search for "auto_config_env" and enter your API key in the input box.
- The extension is designed for Ubuntu and not tested on Windows.
This extension contributes the following settings:
- "auto_config_env.openaiApiKey": "Your OpenAI Key"
- "auto_config_env.gpt_model": "gpt-3.5-turbo-1106" or other models(without tests)
Let me know if there's anything else you'd like to add or change!
Support other LLMs like claude.
Remove reduncdant Tokens and avoid large files.(To save your money hehe)(v1.0.1)
Change the order of ops in menus to prevent mistouching.(v1.1.1)
Auto delete same Imports after "Auto: Install".(But I'm not very sure. Deleting users' contents is a very sensitive operation, although they are redundant.)