open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Don't ask "Would you like to run this code?"

Open qchaoran opened this issue 2 years ago • 4 comments

Describe the bug

我使用anaconda配置了虚拟环境。并使用终端在虚拟环境下使用interpreter。然而,interpreter在给出代码后,并不询问是否执行。 I configured the virtual environment using anaconda. And use the terminal to use the interpreter in a virtual environment. However, after providing the code, the interpreter does not inquire whether to execute it.

Reproduce

Microsoft Windows [版本 10.0.22631.3296] (c) Microsoft Corporation。保留所有权利。

D:\Desktop\open-interpreter-main>activate gpt_interpreter

(gpt_interpreter) D:\Desktop\open-interpreter-main>interpreter

▌ Model set to gpt-4-0125-preview

Use interpreter -y to bypass this.

Press CTRL-C to exit.

What files do I have on my F drive

To list all the files on your F drive, we can use Python's os module to walk through the directories and list all files. Here's the plan:

1 Use the os.walk function to iterate through all directories and files on the F drive. 2 Print each file's path.

Let's start by executing the code to list all files on the F drive.

import os

def list_files(drive): for root, dirs, files in os.walk(drive): for file in files: print(os.path.join(root, file))

list_files('F:/')

This code will print the paths of all files located on the F drive. Let's execute this and see the results.

Expected behavior

Would you like to run this code? (y/n)

Screenshots

20240329183233

Open Interpreter version

0.2.4

Python version

3.9

Operating System name and version

Windows11

Additional context

No response

qchaoran avatar Mar 29 '24 10:03 qchaoran

An addition in the opposite directoin -- from my experience, OI is often hallucinating code that isn't actually code from LLM responses. Example below:

Screenshot 2024-04-04 at 12 27 07 AM

This might be a separate problem, I can open another issue to track.

rustom avatar Apr 04 '24 05:04 rustom

Captured in #1172

rustom avatar Apr 04 '24 18:04 rustom