This commit is contained in:
Cheng Zheng
2025-12-20 14:00:55 +08:00
parent fc867f0db9
commit 28b054672a
3 changed files with 4 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
GITHUB_TOKEN="github_pat_*" PAT_TOKEN="github_pat_*"
LLM_API_KEY="sk-*" LLM_API_KEY="sk-*"
LLM_BASE_URL="https://api.deepseek.com" LLM_BASE_URL="https://api.deepseek.com"

View File

@@ -6,7 +6,7 @@ from openai import OpenAI
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
# ================= 配置区 ================= # ================= 配置区 =================
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN") PAT_TOKEN = os.getenv("PAT_TOKEN")
API_KEY = os.getenv("LLM_API_KEY") API_KEY = os.getenv("LLM_API_KEY")
BASE_URL = os.getenv("LLM_BASE_URL", "https://api.openai.com/v1") BASE_URL = os.getenv("LLM_BASE_URL", "https://api.openai.com/v1")
REPO_NAME = "1c7/chinese-independent-developer" REPO_NAME = "1c7/chinese-independent-developer"
@@ -50,7 +50,7 @@ def get_ai_project_line(raw_text):
return response.choices[0].message.content.strip() return response.choices[0].message.content.strip()
def main(): def main():
g = Github(GITHUB_TOKEN) g = Github(PAT_TOKEN)
repo = g.get_repo(REPO_NAME) repo = g.get_repo(REPO_NAME)
issue = repo.get_issue(ISSUE_NUMBER) issue = repo.get_issue(ISSUE_NUMBER)

View File

@@ -22,7 +22,7 @@ jobs:
- name: Run script - name: Run script
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
# 如果你用的不是 OpenAI 原生接口,可以设置这个环境变量,否则默认使用 OpenAI # 如果你用的不是 OpenAI 原生接口,可以设置这个环境变量,否则默认使用 OpenAI
LLM_BASE_URL: "https://api.deepseek.com" LLM_BASE_URL: "https://api.deepseek.com"