Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Commit 381fa24

Browse files
committed
feat: 完成
0 parents  commit 381fa24

File tree

9 files changed

+1145
-0
lines changed

9 files changed

+1145
-0
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
coverage
6+
7+
# dependencies
8+
node_modules
9+
10+
# IDEs and editors
11+
/.idea
12+
13+
# misc
14+
/.sass-cache
15+
npm-debug.log
16+
17+
# System Files
18+
.DS_Store
19+
Thumbs.db

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @hcfy/plugin-chatgpt
2+
3+
在划词翻译中使用 ChatGPT。
4+
5+
## 如何使用
6+
7+
你需要确保你已经注册过 ChatGPT 并能在网页上正常对话,然后:
8+
9+
1. 前往 [https://chat.openai.com/chat](https://chat.openai.com/chat),找到名为 `__Secure-next-auth.session-token` 的 Cookie 并将值写入环境变量 `SESSION_TOKEN` 中。详细步骤请查看:https://github.com/transitive-bullshit/chatgpt-api#session-tokens
10+
2. 安装 Node.js。
11+
3. 运行 `npm i -g @hcfy/plugin-chatgpt`,然后运行 `hcfy-chatgpt`
12+
4. 前往划词翻译的【设置】-【通用】-【自定义翻译源】,将“接口地址”填写 `http://localhost:8888`,将“翻译源名称”填写 `ChatGPT`,然后点击【测试】按钮。
13+
14+
如果能正常弹出结果,那么就可以在网页上划词并显示 ChatGPT 的回复了,如下图:
15+
16+
![截图](./ss.png)

0 commit comments

Comments
 (0)