From 69ff902e78d6e716234cd644d68fff3f7310be67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 21 Jun 2023 10:41:06 +0200 Subject: [PATCH] fix(gpt): use api key command arg --- packages/gpt.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gpt.nix b/packages/gpt.nix index 10ac668..ad1a49a 100644 --- a/packages/gpt.nix +++ b/packages/gpt.nix @@ -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' ''