Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Aug 13, 2024
1 parent 8b76ead commit d0adcf1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions contracts/scripts/ci/find_slither_report_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d0adcf1

Please sign in to comment.