aandrew-me / tgpt

AI Chatbots in terminal without needing API keys
GNU General Public License v3.0
2k stars 169 forks source link

Line wrapping #13

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello.

Is there any trick or way to use line wrapping (shift + enter)? When you try to send a request with a script, it looks like this:

tgpt 'What does this code do? #!/bin/bash                                                                                                  ~

url=$(xclip -o) 

if [[ $url =~ ^(https?://) ]]; then 
  mpv "$url" --title='${media-title}'
fi
'
What does this code do? #!/bin/bash                                                                                                  ~

url=$(xclip -o) 

if [[ $url =~ ^(https?://) ]]; then 
  mpv \"$url\" --title=title
fi

Error. Your IP is being blocked by the server.
Status Code: 400
aandrew-me commented 1 year ago

It looks fine, its just the backend server has setup some protection that when it sees these special characters, it blocks the request. That's why you are getting an error.

aandrew-me commented 1 year ago

In these cases use the site instead.

You have these two sites which don't require any login https://chatbot.theb.ai/ https://www.phind.com/