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

Handling of multiple rows input

Open shkarlsson opened this issue 1 year ago • 3 comments

Describe the bug

When I copy-paste some text with multiple rows into the chat (in terminal on a Mac, ssh'd into a linux server), I expect it to send as one message. Instead, it sends the first row, waits for the AI response, then the second row, waits for response, etc.

Reproduce

  1. Open terminal
  2. Run interpreter
  3. Copy+paste the following into the chat
Respond "beep"
and "boop"
  1. Before hitting enter, a "beep" response will arrive and only the second row will remain waiting to be sent.

Expected behavior

Instead of the first row being sent and the response to that ("beep") being received, the multi-line input should just be inputted as one and not sent yet.

Screenshots

No response

Open Interpreter version

0.3.12, 0.3.12,3.10.12

Python version

1.12.5, 3.10.12,3.10.12

Operating System name and version

MacOS 14.5, Ubuntu 22.04.4 LTS,Ubuntu 22.04.3 LTS

Additional context

The Ubuntus have only been tested with SSH from the mac.

A related issue might be that it fails to create proper files using EOF:

  sudo sh -c 'cat <<EOF > test.txt                                                                                   
  Some text
                                                                                                                                                
  Some more text'       

Files produced by interpreter with this method will contain rows of echo "" instead of blank rows

shkarlsson avatar Sep 09 '24 08:09 shkarlsson

Confirming the same issue on Windows as well. CLI only. The Python API allow passing multiline chat messages.

virtualramblas avatar Sep 16 '24 12:09 virtualramblas

Have you tried by starting with """?

MikeBirdTech avatar Nov 04 '24 16:11 MikeBirdTech

On Mac, you can first use a local text editor (such as TextEdit, Sublime Text, Visual Studio Code, etc.) to open a new file, and then copy and paste the multi-line text you want to send to the file. In the middle. Then, organize multi-line text into one line in the text editor by deleting the line break (in most text editors, you can use the search and replace function to replace \n with an empty string, and the specific operation is slightly different from editor to editor). After that, copy the sorted line of text and paste it into the chat input area of the terminal and send it out, so that it will be sent as a line of messages.

Lxh-377 avatar Nov 30 '24 04:11 Lxh-377