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

VSCode terminal does not offer code execution y/n option #1209

Open
jackokring opened this issue Apr 17, 2024 · 0 comments
Open

VSCode terminal does not offer code execution y/n option #1209

jackokring opened this issue Apr 17, 2024 · 0 comments

Comments

@jackokring
Copy link

Describe the bug

Python code is emitted, but no option to execute it.

Reproduce

  1. interpreter in the vs code terminal.

Expected behavior

Not this

πŸ’€ 70% ❯ i

β–Œ Model set to gpt-3.5-turbo                                                                                                                          

Open Interpreter will require approval before running code.                                                                                             

Use interpreter -y to bypass this.                                                                                                                      

Press CTRL-C to exit.                                                                                                                                   

> %%ls

> add the first 20 primes
                                                                                                                                                        
                                                                          Plan                                                                          
                                                                                                                                                        
   1 Write a program in Python to find the first 20 prime numbers.                                                                                      
   2 Execute the Python program to calculate and display the first 20 prime numbers.                                                                    
                                                                                                                                                        
                                                                 Python Implementation                                                                  
                                                                                                                                                        
                                                                                                                                                        
   # Function to check if a number is prime                                                                                                             
   def is_prime(num):                                                                                                                                   
       if num < 2:                                                                                                                                      
           return False                                                                                                                                 
       for i in range(2, int(num**0.5)+1):                                                                                                              
           if num % i == 0:                                                                                                                             
               return False                                                                                                                             
       return True                                                                                                                                      
                                                                                                                                                        
   # Find the first 20 prime numbers                                                                                                                    
   primes = []                                                                                                                                          
   num = 2                                                                                                                                              
   while len(primes) < 20:                                                                                                                              
       if is_prime(num):                                                                                                                                
           primes.append(num)                                                                                                                           
       num += 1                                                                                                                                         
                                                                                                                                                        
   primes                                                                                                                                               
                                                                                                                                                        
                                                                                                                                                        
>

Screenshots

No response

Open Interpreter version

0.2.4

Python version

3.11.2

Operating System name and version

Chromebook Debian Bookworm arm64 vs code terminal

Additional context

No response

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

No branches or pull requests

1 participant