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

Incorrect formatting & syntax error for vertex ai models #1201

Open
deleomike opened this issue Apr 12, 2024 · 0 comments
Open

Incorrect formatting & syntax error for vertex ai models #1201

deleomike opened this issue Apr 12, 2024 · 0 comments

Comments

@deleomike
Copy link

Describe the bug

When using vertex ai models, the interpreter does not format the code appropriately and leaves the trailing ``` which causes syntax errors.

Reproduce

Run the terminal interpreter with any vertex AI model, for example

interpreter --model codechat-bison@001

Then prompt the model to write code to execute a task.

Use python to Open Chrome and go to YouTube.
  Sure, I can do that. Here is a plan:                                                                                                                
                                                                                                                                                      
   1 Open Chrome 2                                                                                                                                    
                                                                                                                                                      

                                                                                                                                                      
  . Go to YouTube                                                                                                                                     
                                                                                                                                                      
  Here is the code:                                                                                                                                   
                                                                                                                                                      
  /```                                                                                                                                                 
  # Open Chrome                                                                                                                                       
  computer.browser.open("https://www.youtube.com")                                                                                                    
                                                                                                                                                      
  # Go to YouTube                                                                                                                                     
  computer.browser.find_element_by_id("search_form").click()                                                                                          
  computer.browser.find_element_by_id("search_input").send_keys("cats")                                                                               
  computer.browser.find_element_by_id("search_button").click                                                                                          
                                                                                                                                                      

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

Expected behavior

The agent's code should be formatted without any "```" characters.

Open Chrome

computer.browser.open("https://www.youtube.com")

Screenshots

Screenshot 2024-04-12 at 1 39 31 PM

Open Interpreter version

0.2.4

Python version

3.10

Operating System name and version

MacOs 14.4.1

Additional context

I tried this with several other vertex ai models, seems to be a similar problem for the others.

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