v1.1.1版本,使用重载时,出现失败 #404
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Add comment via ChatGPT | |
| on: | |
| issues: | |
| types: [opened, edited] | |
| jobs: | |
| chat: | |
| if: |- | |
| github.event.action == 'opened' | |
| || (github.event.action == 'edited' && github.event.issue.comments < 1) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Format Message | |
| id: format | |
| shell: bash | |
| run: | | |
| body=$(cat <<EOF | |
| ${{ github.event.issue.body }} | |
| EOF) | |
| body=$(sed '/^###/ s|\s/\s.*||' <<< "$body") | |
| { | |
| echo 'BODY<<EOF' | |
| echo "$body" | |
| echo EOF | |
| } >> "$GITHUB_OUTPUT" | |
| - id: chat | |
| name: Generated comment via ChatGPT | |
| uses: aahl/chatgpt-action@main | |
| with: | |
| api_base: ${{ secrets.CHATGPT_API_BASE }} | |
| api_key: ${{ secrets.CHATGPT_API_KEY }} | |
| model: deepseek-v3 | |
| prompt: | | |
| You are a Github issue assistant, please answer this question. | |
| message: | | |
| # ${{ github.event.issue.title }} | |
| ${{ steps.format.outputs.BODY }} | |
| > This is the title (first line) and content of the issue submitted by the user. | |
| > The reply must be in the language of the "The problem" content, or in the language of the issue title if no content details are provided, and in English if it is unclear. | |
| > If the issue feedback is about a problem with a specific device, check if the user has provided the device model, | |
| > entity attributes, and ha logs; remind the user if they have not provided this information. | |
| - name: Create comment | |
| uses: actions-cool/issues-helper@v3 | |
| with: | |
| actions: create-comment | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| body: ${{ steps.chat.outputs.REPLY }} |