File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,30 @@ jobs:
7878 shell : /usr/bin/bash -e {0}
7979
8080 # Step 9: Perform code review using Ollama
81+ # - name: Code Review
82+ # run: |
83+ # RAW_RESPONSE=$(curl -s -X POST http://localhost:11434/api/generate \
84+ # -d '{
85+ # "model": "'"${{ env.MODEL_NAME }}"'",
86+ # "prompt": "'"${{ env.prompt }}"'",
87+ # "temperature": 0.5,
88+ # "stream": false
89+ # }' || { echo "API call failed"; exit 1; })
90+ # echo "RAW RESPONSE:\n$RAW_RESPONSE"
91+
8192 - name : Code Review
8293 run : |
94+ PAYLOAD=$(jq -n \
95+ --arg model "$MODEL_NAME" \
96+ --arg prompt "$prompt" \
97+ '{
98+ model: $model,
99+ prompt: $prompt,
100+ temperature: 0.5,
101+ stream: false
102+ }')
83103 RAW_RESPONSE=$(curl -s -X POST http://localhost:11434/api/generate \
84- -d '{
85- "model": "'"${{ env.MODEL_NAME }}"'",
86- "prompt": "'"${{ env.prompt }}"'",
87- "temperature": 0.5,
88- "stream": false
89- }' || { echo "API call failed"; exit 1; })
104+ -d "$PAYLOAD" || { echo "API call failed"; exit 1; })
90105 echo "RAW RESPONSE:\n$RAW_RESPONSE"
91106
92107 # Step 9: Optionally save the response as an artifact
You can’t perform that action at this time.
0 commit comments