Add check for OPENAI_KEY env variable

pull/68/head
Tobias Laving 1 year ago
parent f33fe3752f
commit 525bdbaef4
  1. 6
      chatgpt.sh

@ -1,4 +1,10 @@
#!/bin/bash
if [[ -z "$OPENAI_KEY" ]]; then
echo "OPENAI_KEY is not set, exiting"
exit 1
fi
GLOBIGNORE="*"
CHAT_INIT_PROMPT="You are ChatGPT, a Large Language Model trained by OpenAI. You will be answering questions from users. You answer as concisely as possible for each response (e.g. don’t be verbose). If you are generating a list, do not have too many items. Keep the number of items short. Before each user prompt you will be given the chat history in Q&A form. Output your answer directly, with no labels in front. Do not start your answers with A or Anwser. You were trained on data up until 2021. Today's date is $(date +%d/%m/%Y)"

Loading…
Cancel
Save