diff options
-rwxr-xr-x | bin/gpt/gpt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/gpt/gpt b/bin/gpt/gpt index 9a0e830..34f7635 100755 --- a/bin/gpt/gpt +++ b/bin/gpt/gpt | |||
@@ -3,8 +3,7 @@ | |||
3 | # TODO | 3 | # TODO |
4 | # - Use suggested block to wrap data: | 4 | # - Use suggested block to wrap data: |
5 | # https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api | 5 | # https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api |
6 | # - Print token usage when exit | 6 | # - Cowork with https://github.com/openai/chatgpt-retrieval-plugin |
7 | # - For the chat | ||
8 | 7 | ||
9 | # Necessary commands | 8 | # Necessary commands |
10 | stacks=( curl jq ) | 9 | stacks=( curl jq ) |
@@ -118,7 +117,7 @@ _get_content() { | |||
118 | [[ "$content" =~ ^\. ]] && echo && _configure_options && echo -e '\n======\n' && continue | 117 | [[ "$content" =~ ^\. ]] && echo && _configure_options && echo -e '\n======\n' && continue |
119 | [ -n "$content" ] && break | 118 | [ -n "$content" ] && break |
120 | done | 119 | done |
121 | elif [[ "$count" -eq 0 && -z "$data" ]]; then | 120 | elif [[ "$count" -eq 0 && -z "${content}${data}" ]]; then |
122 | echo -e "No data from STDIN\n" | 121 | echo -e "No data from STDIN\n" |
123 | exit 1; | 122 | exit 1; |
124 | fi | 123 | fi |