1
0
mirror of https://github.com/kmein/niveum synced 2026-03-31 01:31:13 +02:00

2 Commits

Author SHA1 Message Date
69ff902e78 fix(gpt): use api key command arg 2023-06-21 10:41:12 +02:00
cb995b0ad9 feat: install haskell 2023-06-21 10:41:12 +02:00
2 changed files with 7 additions and 1 deletions

View File

@@ -224,6 +224,12 @@ in {
niveumPackages.kpaste
config.nur.repos.mic92.ircsink
(haskellPackages.ghcWithPackages (hs: [
hs.text
hs.lens
hs.bytestring
]))
(python3.withPackages (py: [
py.black
# py.python-language-server

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'
''