diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index 508c43fb969..ce261b856fb 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -426,6 +426,17 @@ jobs: fi done + - name: Upload debug + if: always() && needs.changes.outputs.sol_mod_only == 'true' + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + timeout-minutes: 10 + continue-on-error: true + with: + name: chatgpt-debug + path: | + prompt*.json + retention-days: 7 + # actions that execute only if any existing contracts were modified end here - name: Print Slither summary shell: bash diff --git a/contracts/scripts/ci/find_slither_report_diff.sh b/contracts/scripts/ci/find_slither_report_diff.sh index 27037d08f20..59cb532af27 100755 --- a/contracts/scripts/ci/find_slither_report_diff.sh +++ b/contracts/scripts/ci/find_slither_report_diff.sh @@ -27,6 +27,18 @@ first_report_content=$(cat "$first_report_path" | sed -E 's/\\+$//g' | sed -E 's second_report_content=$(cat "$second_report_path" | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') openai_prompt=$(cat "$report_prompt_path" | sed 's/"/\\"/g' | sed -E 's/\\+$//g' | sed -E 's/\\+ //g') openai_model="gpt-4o" + +echo '{ + "model": "'$openai_model'", + "temperature": 0.1, + "messages": [ + { + "role": "system", + "content": "'$openai_prompt' \nreport1:\n```'$first_report_content'```\nreport2:\n```'$second_report_content'```" + } + ] +}' | envsubst > prompt_request.json + openai_result=$(echo '{ "model": "'$openai_model'", "temperature": 0.1,