aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/gpt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gpt')
-rwxr-xr-xbin/gpt/gpt1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/gpt/gpt b/bin/gpt/gpt
index b348a2e..7dc55dd 100755
--- a/bin/gpt/gpt
+++ b/bin/gpt/gpt
@@ -224,6 +224,7 @@ _get_input_by_fzf() {
224 224
225# Check OPENAI API KEY in env 225# Check OPENAI API KEY in env
226# Exit with 6 (configuration issue) if it is not set 226# Exit with 6 (configuration issue) if it is not set
227XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
227[ -z "$OPENAI_API_KEY" ] && OPENAI_API_KEY=$(cat "$XDG_CONFIG_HOME"/openai/key) 228[ -z "$OPENAI_API_KEY" ] && OPENAI_API_KEY=$(cat "$XDG_CONFIG_HOME"/openai/key)
228[ -z "$OPENAI_API_KEY" ] && { echo API KEY not specified; exit 6; } 229[ -z "$OPENAI_API_KEY" ] && { echo API KEY not specified; exit 6; }
229 230