ci: Use Gemini instead of openai
This commit is contained in:
parent
0ee3641fc0
commit
2ff3a3b587
1 changed files with 11 additions and 12 deletions
23
.github/workflows/check_duplicates.yaml
vendored
23
.github/workflows/check_duplicates.yaml
vendored
|
|
@ -15,18 +15,17 @@ jobs:
|
||||||
run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV
|
run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV
|
||||||
- name: Send message to GPT
|
- name: Send message to GPT
|
||||||
run: |
|
run: |
|
||||||
curl -X POST \
|
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \
|
||||||
https://api.openai.com/v1/chat/completions \
|
-H 'Content-Type: application/json' \
|
||||||
-H "Content-Type: application/json" \
|
-X POST \
|
||||||
-H "Authorization: Bearer ${{ secrets.OPENAI_KEY }}" \
|
|
||||||
-d '{
|
-d '{
|
||||||
"model": "gpt-3.5-turbo",
|
"contents": [{
|
||||||
"messages": [
|
"parts":[
|
||||||
{"role": "user", "content": "Please link possible duplications of this issue."},
|
{"text": "Please write a very short and nice response to this new issue and link possible duplications."},
|
||||||
{"role": "user", "content": "${{ env.title }}\n${{ env.body }}"},
|
{"text": "${{ env.title }}\n${{ env.body }}"},
|
||||||
{"role": "user", "content": "${{ env.issues }}"}
|
{"text": "${{ env.issues }}"}
|
||||||
],
|
]
|
||||||
"temperature": 0.7
|
}]
|
||||||
}'
|
}'
|
||||||
env:
|
env:
|
||||||
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue