From 7de04c06c95732e86281469804eab28f5ab22b5a Mon Sep 17 00:00:00 2001 From: anaxios Date: Wed, 7 Aug 2024 04:32:23 -0700 Subject: [PATCH] Title: Update GROQ API request to match official documentation Content: Fixed JSON formatting and removed unnecessary comment. URL: https://console.groq.com/docs/ --- aicommit_groq | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aicommit_groq b/aicommit_groq index e8feb81..f477e68 100755 --- a/aicommit_groq +++ b/aicommit_groq @@ -29,7 +29,7 @@ fi message=$( jq -n \ - ".messages = [{role: \"system\", content: $(jq -R -s '@json' <<<"$system")}, {role: \"user\", content: $(jq -R -s '@json' <<<"$diff")}] | + ".messages = [{role: \"system\", content: $(jq -R -s '@json' <<<"${system}")}, {role: \"user\", content: $(jq -R -s '@json' <<<"${diff}")}] | .model = \"llama-3.1-70b-versatile\" | .temperature = 1 | .max_tokens = 1024 | @@ -38,6 +38,7 @@ message=$( .stop = null" ) +# trunk-ignore(shellcheck/SC2312) curl -s "https://api.groq.com/openai/v1/chat/completions" \ -X POST \ -H "Content-Type: application/json" \