Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 全新预设系统、插件系统,实现多模态支持高度可自定义化的 AI 助手 #755

Open
wants to merge 95 commits into
base: browser-version
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
17412c2
refactor: split account manager, add health check for every account
lss233 May 1, 2023
d921174
refactor: split account manager, add health check for every account
lss233 May 1, 2023
f5354d3
feat: poe will support multi-conversation on specified bot type
lss233 May 2, 2023
3cd0604
refactor(tts): standard TTS Engine
lss233 May 2, 2023
d1a7f38
tests(azure, edge): add tests
lss233 May 2, 2023
4043127
refactor: move and rename packages, use factory pattern
lss233 May 2, 2023
e3d9a35
refactor: new prompt system
lss233 May 3, 2023
ea55460
fix: TTS response memory leak
lss233 May 4, 2023
14bc215
fix(onebot, prompt system): sending image
lss233 May 4, 2023
8c52106
fix(catgirl prompt): match negative affinity
lss233 May 4, 2023
90eae2b
[WIP] refactor: reduce paramters count in middlewares
lss233 May 5, 2023
8b6024b
refactor: reduce paramters count in middlewares
lss233 May 6, 2023
d07efb9
fix: handle bing error exception
lss233 May 6, 2023
e6b7782
'Refactored by Sourcery' (#756)
sourcery-ai[bot] May 5, 2023
d6dc925
fix: timeout checking
lss233 May 6, 2023
96ae2cf
refactor(telegram): respond callback
lss233 May 6, 2023
4c8c13a
feat: discord support proxy
lss233 May 6, 2023
a162b75
refactor(discord): new request and response
lss233 May 6, 2023
c9030c8
refactor(wecom): new request and response
lss233 May 6, 2023
fb205fe
refactor(http-api): use single quart instance
lss233 May 9, 2023
5bbe3d0
refactor(http-api-legacy): new request and response
lss233 May 10, 2023
9588381
refactor(http-api): stop repeating sent text
lss233 May 10, 2023
e2c3b41
refactor(http-api): close connection
lss233 May 10, 2023
b90e668
'Refactored by Sourcery' (#792)
sourcery-ai[bot] May 10, 2023
ee48a06
refactor: replace comments with Fields in models
lss233 May 10, 2023
2e15c2c
feat(http-api): add password and protect routes
lss233 May 10, 2023
0ea9867
feat(http-api): add cloudflared tunnel
lss233 May 10, 2023
46c0130
feat(webui): add static files
lss233 May 10, 2023
8610c15
refactor: remove unused files
lss233 May 11, 2023
f0915ad
ci: add trigger on windows quickstart, remove redundant operations
lss233 May 11, 2023
cc64cc4
fix: add missing pycloudflared
lss233 May 11, 2023
d808021
ci: supress exception on downloading cloudflare
lss233 May 11, 2023
d8e757b
fix: update default config
lss233 May 12, 2023
7bdace8
fix: update for default configuration
lss233 May 12, 2023
d536406
feat: add default promt preset
WangEdward May 14, 2023
0ddd8af
fix(llm): google bard
WangEdward May 15, 2023
5fb4992
Update .gitignore
WangEdward May 15, 2023
b11fc90
ci(quickstart-mirai): upgrade fix-protocol-version to 1.5.0
lss233 May 15, 2023
43972e9
feat(http-api): support password changing
lss233 May 15, 2023
b69a4c0
fix(llm): bing livecheck
WangEdward May 15, 2023
e1aa3a1
chore(prompts): rename action
WangEdward May 15, 2023
b077fa1
feat: add tts prompt
WangEdward May 15, 2023
a624039
fix(tts): speak for edge
WangEdward May 15, 2023
425d03f
fix(platforms): wecom voice message
WangEdward May 15, 2023
cdda8ac
feat(prompts): support llm wildcard
WangEdward May 15, 2023
61931a0
refactor: tts/speak action
WangEdward May 15, 2023
9dcabe4
feat: support voice not enabled
WangEdward May 15, 2023
0c85dcb
refactor(prompts): default propmt
WangEdward May 15, 2023
13e5353
chore: use default prompts
WangEdward May 15, 2023
23543ab
refactor(llm): bing livechack
WangEdward May 15, 2023
3686072
chore(llm): remove unused import statement
WangEdward May 15, 2023
2e9a545
fix: type check
WangEdward May 16, 2023
9b16d70
Update prompts/default.yml
WangEdward May 16, 2023
845ef7b
refactor: framework/universal.py
WangEdward May 16, 2023
a01b897
fix: missing trust_env
WangEdward May 16, 2023
ca79d26
refactor: supported_llms wildcard
WangEdward May 16, 2023
926e6f3
fix(conversation): speak function
WangEdward May 16, 2023
aa702e5
refactor: remove unnecessary prompt action
WangEdward May 16, 2023
4ca561a
feat(llm): raise exception for bing livecheck
WangEdward May 16, 2023
5806daf
refactor: change parameter type
WangEdward May 16, 2023
19e5794
chore: print urls on start
lss233 May 16, 2023
9bd606f
'Refactored by Sourcery'
May 16, 2023
78666ee
refactor(chatgpt-web): support v3 structure
lss233 May 16, 2023
a5ec8df
fix(deps): bump httpx to 0.24.0
lss233 May 16, 2023
30fc149
fix(chatgpt-api): missing model entry
lss233 May 16, 2023
e5da7c6
luanxie
Haibersut Jun 6, 2023
e511989
Update qqchannel.py
Haibersut Jun 6, 2023
6a8b784
Update qqchannel.py
Haibersut Jun 6, 2023
6a8d6ac
update
Haibersut Jun 8, 2023
910ced1
Update qqchannel.py
Haibersut Jun 8, 2023
45c13c3
Update qqchannel.py
Haibersut Jun 8, 2023
cc24506
Update qqchannel.py
Haibersut Jun 8, 2023
9a99e05
fix: replace parent client
lss233 Jun 10, 2023
0f60818
Merge branch 'lss233:refactor-v3' into refactor-v3
Haibersut Jun 11, 2023
470e24c
optimize
Haibersut Jun 11, 2023
958e445
Merge branch 'refactor-v3' of https://github.com/Haibersut/chatgpt-mi…
Haibersut Jun 11, 2023
77fcff4
修改mirai适配
Haibersut Jun 12, 2023
1e64fc1
fix qqchannel and requirement
Haibersut Jun 12, 2023
2ac2fde
'Refactored by Sourcery'
Jun 12, 2023
a2f16cd
Merge pull request #950 from lss233/sourcery/pull-949
Haibersut Jun 13, 2023
2ff8e99
Merge remote-tracking branch 'origin/browser-version' into refactor-v3
lss233 Sep 8, 2023
5aec583
Merge remote-tracking branch 'origin/browser-version' into refactor-v3
lss233 Sep 8, 2023
0c7c811
lint: pep8 format
lss233 Sep 8, 2023
3d4e2a6
refactor: optimize imports
lss233 Sep 9, 2023
6f46b30
'Refactored by Sourcery'
Sep 9, 2023
9b2bbab
fix(poe-web): use remote access point
lss233 Sep 9, 2023
985cd4d
ci: do not overwrite
lss233 Sep 9, 2023
b727693
ci: bump go-cqhttp version
lss233 Sep 10, 2023
1b5df48
fix(bing): use custom backend
lss233 Sep 10, 2023
5bc4fb6
fix: prompt engine handle preset correctly
lss233 Sep 10, 2023
f987a27
chore: add hint to webui address
lss233 Sep 10, 2023
1567233
fix: unable to save chatgpt-web
lss233 Sep 29, 2023
2a06942
fix: chatgpt-web has stupid proxy check config
lss233 Sep 29, 2023
742e325
fix: seperate channel in qq guild
lss233 Sep 29, 2023
71e0a0c
fix(openai-api): update checking method
lss233 Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.py]
max_line_length = 120

[LICENSE]
insert_final_newline = false
16 changes: 1 addition & 15 deletions .github/quickstarts/windows/config.example.go-cqhttp.cfg
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
# 这里是 ChatGPT for QQ 的所有配置文件
# 请注意:以 "#" 开头的文本均为注释
# 不会被程序读取
# 如果你想要使用某个设置,请确保前面没有 "#" 号

########################
# 配置文件编写教程:
# https://chatgpt-qq.lss233.com/
# 你也可以使用 WebUI 来修改配置
########################
[onebot]
manager_qq = 请修改为机器人管理员的QQ号(你本人的 QQ 号)

[openai]
# 如果你想添加 Claude、Bing 等 AI,请阅读【教程】

[[openai.accounts]]
access_token = "这里填写你的 access_token(其他接入方式请看教程)"
# 国内用户可能需要配置代理
# proxy="http://127.0.0.1:7890"

[presets]
# 切换预设的命令: 加载预设 猫娘
command = "加载预设 (\\w+)"
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/quickstart-windows-dev-gocqhttp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Windows Quickstart Dev (go-cqhttp)

on:
workflow_dispatch:
pull_request:
push:
branches:
- 'browser-version-dev'
Expand All @@ -12,7 +13,7 @@ concurrency:

jobs:
build:
name: Quickstart (GO-CQHTTP)
name: Windows Quickstart Dev (go-cqhttp)
runs-on: Windows-latest

steps:
Expand All @@ -28,14 +29,14 @@ jobs:
mkdir go-cqhttp
mkdir chatgpt
mkdir ffmpeg
Invoke-WebRequest -URI https://github.com/Mrs4s/go-cqhttp/releases/download/v1.0.1/go-cqhttp_windows_amd64.exe -OutFile C:/generated_files/go-cqhttp/go-cqhttp.exe
Invoke-WebRequest -URI https://github.com/Mrs4s/go-cqhttp/releases/download/v1.1.0/go-cqhttp_windows_amd64.exe -OutFile C:/generated_files/go-cqhttp/go-cqhttp.exe

cp -r D:\a\chatgpt-mirai-qq-bot\chatgpt-mirai-qq-bot\* C:\generated_files\chatgpt\

echo "Downloading ffmpeg ..."
Invoke-WebRequest https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z -OutFile C:/tmp_files/ffmpeg.7z
7z x C:/tmp_files/ffmpeg.zip -r -oC:/generated_files/ffmpeg

echo "Downloading Python3.11 ..."
Invoke-WebRequest https://www.python.org/ftp/python/3.11.2/python-3.11.2-embed-amd64.zip -OutFile C:/tmp_files/python.zip
7z x C:/tmp_files/python.zip -r -oC:/generated_files/python3.11
Expand All @@ -49,31 +50,32 @@ jobs:

echo "Replacing..."
cp C:/generated_files/files/go-cqhttp/scripts/初始化.cmd C:/generated_files/

Invoke-WebRequest -URI https://github.com/lss233/awesome-chatgpt-qq-presets/archive/refs/heads/master.zip -OutFile C:/tmp_files/presets.zip
7z x C:/tmp_files/presets.zip -oC:/tmp_files/
Copy-Item C:\tmp_files\awesome-chatgpt-qq-presets-master\* -Destination C:\generated_files\chatgpt\presets\ -Recurse

Invoke-WebRequest -URI https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.mxe-cross-win64.7z -O C:/tmp_files/wkhtmltox.7z

echo "Downloading vc_redist.exe..."
Invoke-WebRequest -URI https://aka.ms/vs/17/release/vc_redist.x64.exe -O "C:\generated_files\【语音功能依赖】vc_redist.x64.exe"

echo "Setting up wkhtmltox"
7z x C:/tmp_files/wkhtmltox.7z -oC:/tmp_files/
cp C:/tmp_files/wkhtmltox/bin/wkhtmltoimage.exe C:\generated_files\chatgpt\

echo "Downloading packages..."
cd C:/generated_files/chatgpt
..\python3.11\python.exe C:/generated_files/python3.11/get-pip.py
..\python3.11\python.exe -m pip install -r requirements.txt

echo "Packing..."
..\python3.11\python.exe -c exec("""from pycloudflared import try_cloudflare \ntry: try_cloudflare(-1)\nexcept:... """)

echo "Packing..."
cd C:/generated_files
7z a quickstart-windows-dev-go-cqhttp-amd64.zip C:\generated_files\*
7z a quickstart-windows-go-cqhttp-amd64.zip C:\generated_files\*
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: quickstart-windows-dev-go-cqhttp-amd64.zip
name: quickstart-windows-go-cqhttp-amd64.zip
path: |
C:\generated_files\quickstart-windows-dev-go-cqhttp-amd64.zip
C:\generated_files\quickstart-windows-go-cqhttp-amd64.zip
8 changes: 4 additions & 4 deletions .github/workflows/quickstart-windows-dev-mirai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Windows Quickstart Dev (Mirai)

on:
workflow_dispatch:
pull_request:
push:
branches:
- 'browser-version-dev'
Expand All @@ -12,7 +13,7 @@ concurrency:

jobs:
build:
name: Quickstart
name: Windows Quickstart Dev (Mirai)
runs-on: Windows-latest

steps:
Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:

(Get-Content -Path 'C:/generated_files/mirai/mcl.cmd' -Raw) -replace $search, $replace | Set-Content -Path 'C:/generated_files/mirai/mcl.cmd'

Invoke-WebRequest -URI https://github.com/cssxsh/fix-protocol-version/releases/download/v1.3.0/fix-protocol-version-1.3.0.mirai2.jar -OutFile C:/generated_files/mirai/plugins/fix-protocol-version-1.3.0.mirai2.jar
Invoke-WebRequest -URI https://github.com/cssxsh/fix-protocol-version/releases/download/v1.5.0/fix-protocol-version-1.5.0.mirai2.jar -OutFile C:/generated_files/mirai/plugins/fix-protocol-version-1.5.0.mirai2.jar

./mcl.cmd --update-package net.mamoe:mirai-api-http --channel stable-v2 --type plugin
./mcl.cmd --update-package xyz.cssxsh.mirai:mirai-device-generator --channel stable --type plugin
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
cd C:/generated_files/chatgpt
..\python3.11\python.exe C:/generated_files/python3.11/get-pip.py
..\python3.11\python.exe -m pip install -r requirements.txt

..\python3.11\python.exe -c exec("""from pycloudflared import try_cloudflare \ntry: try_cloudflare(-1)\nexcept:... """)
echo "Packing..."
cd C:/generated_files
7z a quickstart-windows-mirai-amd64.zip C:\generated_files\*
Expand All @@ -95,4 +96,3 @@ jobs:
name: quickstart-windows-mirai-amd64.zip
path: |
C:\generated_files\quickstart-windows-mirai-amd64.zip

31 changes: 13 additions & 18 deletions .github/workflows/quickstart-windows-gocqhttp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
mkdir go-cqhttp
mkdir chatgpt
mkdir ffmpeg
Invoke-WebRequest -URI https://github.com/Mrs4s/go-cqhttp/releases/download/v1.0.1/go-cqhttp_windows_amd64.exe -OutFile C:/generated_files/go-cqhttp/go-cqhttp.exe
Invoke-WebRequest -URI https://github.com/Mrs4s/go-cqhttp/releases/download/v1.1.0/go-cqhttp_windows_amd64.exe -OutFile C:/generated_files/go-cqhttp/go-cqhttp.exe

cp -r D:\a\chatgpt-mirai-qq-bot\chatgpt-mirai-qq-bot\* C:\generated_files\chatgpt\

echo "Downloading ffmpeg ..."
Invoke-WebRequest https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z -OutFile C:/tmp_files/ffmpeg.7z
7z x C:/tmp_files/ffmpeg.zip -r -oC:/generated_files/ffmpeg

echo "Downloading Python3.11 ..."
Invoke-WebRequest https://www.python.org/ftp/python/3.11.2/python-3.11.2-embed-amd64.zip -OutFile C:/tmp_files/python.zip
7z x C:/tmp_files/python.zip -r -oC:/generated_files/python3.11
Expand All @@ -45,40 +45,35 @@ jobs:

echo "Replacing..."
cp C:/generated_files/files/go-cqhttp/scripts/初始化.cmd C:/generated_files/

Invoke-WebRequest -URI https://github.com/lss233/awesome-chatgpt-qq-presets/archive/refs/heads/master.zip -OutFile C:/tmp_files/presets.zip
7z x C:/tmp_files/presets.zip -oC:/tmp_files/
Copy-Item C:\tmp_files\awesome-chatgpt-qq-presets-master\* -Destination C:\generated_files\chatgpt\presets\ -Recurse

Invoke-WebRequest -URI https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.mxe-cross-win64.7z -O C:/tmp_files/wkhtmltox.7z

echo "Downloading vc_redist.exe..."
Invoke-WebRequest -URI https://aka.ms/vs/17/release/vc_redist.x64.exe -O "C:\generated_files\【语音功能依赖】vc_redist.x64.exe"

echo "Setting up wkhtmltox"
7z x C:/tmp_files/wkhtmltox.7z -oC:/tmp_files/
cp C:/tmp_files/wkhtmltox/bin/wkhtmltoimage.exe C:\generated_files\chatgpt\

echo "Downloading packages..."
cd C:/generated_files/chatgpt
..\python3.11\python.exe C:/generated_files/python3.11/get-pip.py
..\python3.11\python.exe -m pip install -r requirements.txt

echo "Packing..."
..\python3.11\python.exe -c exec("""from pycloudflared import try_cloudflare \ntry: try_cloudflare(-1)\nexcept:... """)

echo "Packing..."
cd C:/generated_files
7z a quickstart-windows-go-cqhttp-amd64.zip C:\generated_files\*
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: quickstart-windows-go-cqhttp-amd64.zip
path: |
C:\generated_files\quickstart-windows-go-cqhttp-amd64.zip
- name: Upload compressed files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: C:\generated_files\quickstart-windows-go-cqhttp-amd64.zip
asset_name: Windows-quickstart-go-cqhttp-${{ github.ref }}.zip
tag: ${{ github.ref }}
overwrite: true
overwrite: false
body: "quickstart-windows-amd64.zip is to quickstart go-cqhttp for Windows x64 user"
35 changes: 15 additions & 20 deletions .github/workflows/quickstart-windows-mirai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "Downloading JRE..."
Invoke-WebRequest -URI https://download.bell-sw.com/java/17.0.6+10/bellsoft-jre17.0.6+10-windows-amd64.zip -OutFile C:/tmp_files/jre.zip
7z x C:/tmp_files/jre.zip -r -oC:/generated_files/mirai/jre/

echo "Downloading mcl..."
Invoke-WebRequest -URI https://github.com/iTXTech/mirai-console-loader/releases/download/v2.1.2/mcl-2.1.2.zip -OutFile C:/tmp_files/mcl.zip
7z x C:/tmp_files/mcl.zip -r -oC:/generated_files/mirai/
Expand All @@ -37,19 +37,19 @@ jobs:

(Get-Content -Path 'C:/generated_files/mirai/mcl.cmd' -Raw) -replace $search, $replace | Set-Content -Path 'C:/generated_files/mirai/mcl.cmd'

Invoke-WebRequest -URI https://github.com/cssxsh/fix-protocol-version/releases/download/v1.3.0/fix-protocol-version-1.3.0.mirai2.jar -OutFile C:/generated_files/mirai/plugins/fix-protocol-version-1.3.0.mirai2.jar
Invoke-WebRequest -URI https://github.com/cssxsh/fix-protocol-version/releases/download/v1.5.0/fix-protocol-version-1.5.0.mirai2.jar -OutFile C:/generated_files/mirai/plugins/fix-protocol-version-1.5.0.mirai2.jar

./mcl.cmd --update-package net.mamoe:mirai-api-http --channel stable-v2 --type plugin
./mcl.cmd --update-package xyz.cssxsh.mirai:mirai-device-generator --channel stable --type plugin
./mcl.cmd --update-package xyz.cssxsh.mirai:fix-protocol-version --channel stable --type plugin
./mcl.cmd --dry-run

cp -r D:\a\chatgpt-mirai-qq-bot\chatgpt-mirai-qq-bot\* C:\generated_files\chatgpt\

echo "Downloading ffmpeg ..."
Invoke-WebRequest https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z -OutFile C:/tmp_files/ffmpeg.7z
7z x C:/tmp_files/ffmpeg.zip -r -oC:/generated_files/ffmpeg

echo "Downloading Python3.11 ..."
Invoke-WebRequest https://www.python.org/ftp/python/3.11.2/python-3.11.2-embed-amd64.zip -OutFile C:/tmp_files/python.zip
7z x C:/tmp_files/python.zip -r -oC:/generated_files/python3.11
Expand All @@ -63,41 +63,36 @@ jobs:

echo "Replacing..."
cp C:/generated_files/files/mirai/scripts/初始化.cmd C:/generated_files/

Invoke-WebRequest -URI https://github.com/lss233/awesome-chatgpt-qq-presets/archive/refs/heads/master.zip -OutFile C:/tmp_files/presets.zip
7z x C:/tmp_files/presets.zip -oC:/tmp_files/
Copy-Item C:\tmp_files\awesome-chatgpt-qq-presets-master\* -Destination C:\generated_files\chatgpt\presets\ -Recurse

Invoke-WebRequest -URI https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.mxe-cross-win64.7z -O C:/tmp_files/wkhtmltox.7z

echo "Setting up wkhtmltox"
7z x C:/tmp_files/wkhtmltox.7z -oC:/tmp_files/
cp C:/tmp_files/wkhtmltox/bin/wkhtmltoimage.exe C:\generated_files\chatgpt\

echo "Downloading vc_redist.exe..."
Invoke-WebRequest -URI https://aka.ms/vs/17/release/vc_redist.x64.exe -O "C:\generated_files\【语音功能依赖】vc_redist.x64.exe"

echo "Downloading packages..."
cd C:/generated_files/chatgpt
..\python3.11\python.exe C:/generated_files/python3.11/get-pip.py
..\python3.11\python.exe -m pip install -r requirements.txt

echo "Packing..."
..\python3.11\python.exe -c exec("""from pycloudflared import try_cloudflare \ntry: try_cloudflare(-1)\nexcept:... """)

echo "Packing..."
cd C:/generated_files
7z a quickstart-windows-mirai-amd64.zip C:\generated_files\*
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: quickstart-windows-mirai-amd64.zip
path: |
C:\generated_files\quickstart-windows-mirai-amd64.zip
- name: Upload compressed files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: C:\generated_files\quickstart-windows-mirai-amd64.zip
asset_name: Windows-quickstart-${{ github.ref }}.zip
asset_name: Windows-quickstart-mirai-${{ github.ref }}.zip
tag: ${{ github.ref }}
overwrite: true
overwrite: false
body: "quickstart-windows-amd64.zip 是为 Windows x64 用户准备的快速启动包"

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ data/*.json
Dockerfile.dev
**/.DS_Store
venv/
.vscode/
57 changes: 57 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[MASTER]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=0


[MESSAGES CONTROL]

# Disable the message, report, category or checker with the given id(s).
disable=all

# Enable the message, report, category or checker with the given id(s).
enable=c-extension-no-member,
bad-indentation,
bare-except,
broad-except,
dangerous-default-value,
function-redefined,
len-as-condition,
line-too-long,
misplaced-future,
missing-final-newline,
mixed-line-endings,
multiple-imports,
multiple-statements,
singleton-comparison,
trailing-comma-tuple,
trailing-newlines,
trailing-whitespace,
unexpected-line-ending-format,
unused-import,
unused-variable,
wildcard-import,
wrong-import-order


[FORMAT]

# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=LF

# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$

# Maximum number of characters on a single line.
max-line-length=120

# Maximum number of lines in a module.
max-module-lines=2000


[EXCEPTIONS]

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ RUN mkdir -p /app
WORKDIR /app

COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt && pip cache purge
RUN pip install --no-cache-dir -r requirements.txt && \
pip cache purge && \
python -c "from pycloudflared import try_cloudflare; try_cloudflare(-1)" || true

RUN apt-get remove --purge -yq binutils

Expand Down