Don't keep prompting for my password please

This commit is contained in:
vlad 2023-03-23 09:11:55 -07:00
parent f5582d0f42
commit e5d7d21b92

View File

@ -2,6 +2,7 @@
conversation_file=$(mktemp)
echo new conversation: "$conversation_file"
OPENAPI_TOKEN=$(pass openai/api-key)
prompt="You are Mr.Helper. You are an assistant that lives in a floating terminal above my mac. I can summon you with the press of a button! Feel free to use ansii escape codes to add colors or other formatting to your responses."
@ -18,7 +19,7 @@ while read -rep '> ' prompt ; do
out="$(
http \
-A bearer \
--auth "$(pass openai/api-key)" \
--auth "$OPENAPI_TOKEN" \
https://api.openai.com/v1/chat/completions \
model=gpt-3.5-turbo \
messages:="$messages"