diff options
Diffstat (limited to 'bin/gpt')
| -rwxr-xr-x | bin/gpt/gpt | 2 | ||||
| -rwxr-xr-x | bin/gpt/gpt.image | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/gpt/gpt b/bin/gpt/gpt index ebb1d4b..ab4b64c 100755 --- a/bin/gpt/gpt +++ b/bin/gpt/gpt | |||
| @@ -86,7 +86,7 @@ temperature=${temperature:-0.7} | |||
| 86 | n=${n:-1} | 86 | n=${n:-1} |
| 87 | 87 | ||
| 88 | # Read content from terminal | 88 | # Read content from terminal |
| 89 | [ -z "$content" ] && read -r -p "Let's Chat: " content </dev/tty | 89 | [ -z "$content" ] && read -e -r -p "Let's Chat: " content </dev/tty |
| 90 | [ -z "$content" ] && { echo -e "No message is given\n"; _print_helper_message; exit 1; } | 90 | [ -z "$content" ] && { echo -e "No message is given\n"; _print_helper_message; exit 1; } |
| 91 | [ ! -t 0 ] && data="$(cat)" | 91 | [ ! -t 0 ] && data="$(cat)" |
| 92 | [ -n "$data" ] && content="$(printf "%s\\n\\n%s" "$content" "$data")" | 92 | [ -n "$data" ] && content="$(printf "%s\\n\\n%s" "$content" "$data")" |
diff --git a/bin/gpt/gpt.image b/bin/gpt/gpt.image index 5f85fc0..34f93f2 100755 --- a/bin/gpt/gpt.image +++ b/bin/gpt/gpt.image | |||
| @@ -59,7 +59,7 @@ response_format=${response_format:-url} | |||
| 59 | n=${n:-1} | 59 | n=${n:-1} |
| 60 | 60 | ||
| 61 | # Read content from terminal | 61 | # Read content from terminal |
| 62 | [ -z "$prompt" ] && read -r -p "What image you want? " prompt </dev/tty | 62 | [ -z "$prompt" ] && read -e -r -p "What image you want? " prompt </dev/tty |
| 63 | 63 | ||
| 64 | # Create request body | 64 | # Create request body |
| 65 | body="$(cat <<EOF | 65 | body="$(cat <<EOF |