Skip to content

Commit 8e5efbc

Browse files
author
TonNom
committed
fix : dimishing the amount of chunk file sending to the api so my request is not cancelled (attempt 4)
1 parent 8a3b017 commit 8e5efbc

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

.github/workflows/llm-review.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
exit 0
4949
fi
5050
51-
# Encode the diff in Base64
5251
DIFF_B64=$(base64 -w 0 diff.txt)
5352
5453
RESPONSE=$(curl -s "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions" \
@@ -67,14 +66,7 @@ jobs:
6766
EOF
6867
)
6968
70-
ERROR=$(echo "$RESPONSE" | jq -r '.[0].error.message // empty')
71-
if [ -n "$ERROR" ]; then
72-
echo "⚠️ LLM error: $ERROR"
73-
echo "LLM_RESPONSE=Erreur LLM : $ERROR" >> $GITHUB_OUTPUT
74-
exit 0
75-
fi
76-
77-
FEEDBACK=$(echo "$RESPONSE" | jq -r '.[0].message.content' 2>/dev/null || echo "")
69+
FEEDBACK=$(echo "$RESPONSE" | jq -r '.choices[0].message.content // ""')
7870
echo "LLM_RESPONSE<<EOF" >> $GITHUB_OUTPUT
7971
echo "$FEEDBACK" >> $GITHUB_OUTPUT
8072
echo "EOF" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)