1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

fix(gpt): use api key command arg

This commit is contained in:
2023-06-21 10:41:06 +02:00
parent cb995b0ad9
commit 69ff902e78

View File

@@ -9,7 +9,7 @@ writers.writeDashBin "gpt" ''
json=$(jq --slurp --raw-input '{model:"${model}", messages: [{role: "user", content: .}]}')
${curl}/bin/curl -sSL https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $(pass api-keys/openai.com)" \
-H "Authorization: Bearer $(${apiKeyCommand})" \
-d "$json" \
| ${jq}/bin/jq -r '.choices[] | .message.content'
''