feat: add instructions for OpenAI key if op not present

This commit is contained in:
2024-08-04 12:37:05 +00:00
parent 9d926d1afd
commit 2b31bb15be

View File

@@ -294,9 +294,11 @@ if [[ -z "$OPENAI_API_KEY" ]]; then
if [[ ! -z "$key" ]]; then
echo_yellow "Key retrieved."
echo_yellow "Please run the following to persist the key for future sessions:"
echo "echo 'export OPENAI_API_KEY=\"$key\"' >> $(strip-home $DOTFILES)/_local.sh"
echo "echo 'export OPENAI_API_KEY=\"$key\"' >> $(strip-home $DOTFILES)/_local.zsh"
else
echo_red "No key found in 1Password. Exiting..."
echo_yellow "To add manually, please run the following to persist the key for future sessions:"
echo "echo 'export OPENAI_API_KEY=\"YOUR_OPEN_AI_KEY_HERE\"' >> $(strip-home $DOTFILES)/_local.zsh"
fi
fi
fi