Don't keep prompting for my password please
This commit is contained in:
parent
f5582d0f42
commit
e5d7d21b92
3
ai-chat
3
ai-chat
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user