generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
104 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"insert-template": [ | ||
{ | ||
"modifiers": [ | ||
"Mod" | ||
], | ||
"key": "M" | ||
} | ||
], | ||
"editor:insert-codeblock": [ | ||
{ | ||
"modifiers": [ | ||
"Mod" | ||
], | ||
"key": "Q" | ||
} | ||
], | ||
"insert-current-time": [ | ||
{ | ||
"modifiers": [ | ||
"Mod", | ||
"Shift" | ||
], | ||
"key": "S" | ||
} | ||
], | ||
"editor:swap-line-up": [ | ||
{ | ||
"modifiers": [ | ||
"Alt" | ||
], | ||
"key": "ArrowUp" | ||
} | ||
], | ||
"editor:swap-line-down": [ | ||
{ | ||
"modifiers": [ | ||
"Alt" | ||
], | ||
"key": "ArrowDown" | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: 微信引入个人机器人踩雷篇 | ||
author: X | ||
date: 2024-09-14 09:53:31 +0800 | ||
categories: | ||
- engineering | ||
tags: | ||
- 黑科技 | ||
--- | ||
如题。这个技术已经很成熟很方便了,具体可以看这个库: | ||
[chatgpt-on-wechat](https://github.com/zhayujie/chatgpt-on-wechat) | ||
|
||
简单来说就是,如果你有一个服务器,跟着教程几条命令然后扫个码就可以使用了。 | ||
|
||
一些踩坑点: | ||
我使用的是个人微信小号作为机器人,这个微信是刚注册的,因此一开始会报错,绑定一下银行卡实名认证就可以了。 | ||
|
||
登录之后,切回常用微信,结果也一直报错,发消息没有反应。后来检查发现是因为移动端不登陆也会导致桌面端被踢出,这太折磨了 | ||
|
||
如果你想看详细报错,最好一开始部署的时候就在config.json里加一条:`"debug": ture`,这样会打印更具体的错误原因,比如,我在实名认证、登录且不切号如此这般操作了多次后,发现我的环境没有装gemini所需的依赖: | ||
```bash | ||
pip install -U google-generativeai | ||
``` | ||
|
||
顺带一提,gemini提供了15RPM(每分钟请求数);100万 TPM(每分钟令牌);1500 RPD(每天请求数)的免费额度,所以我用的是gemini。相应的,要在config.json中添加: | ||
``` | ||
"model": "gemini-1.5-pro", | ||
"gemini_api_key": "YOUR API KEY", | ||
``` | ||
|
||
于是装上依赖后,现在可以流畅使用了。 | ||
|
||
另,每次重启都需要重新登陆,重启方法: | ||
|
||
`ps -ef | grep app.py | grep -v grep` | ||
查询到进程pid(第一个数字)后,直接 | ||
`kill [pid]` | ||
然后再运行 | ||
`nohup python3 app.py & tail -f nohup.out` | ||
如果你把日志关了,一方面可以自己去文件里看,另一方面可以再重新打印: | ||
`tail -f nohup.out` |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: 日记 | ||
author: X | ||
date: 2024-09-18 17:25:04 +0800 | ||
categories: | ||
tags: | ||
--- | ||
# 下班提醒 | ||
- [ ] 买鸡蛋和香菇酱,晚上用小锅煮着卷煎饼 | ||
- [ ] 续费机场(电脑查看密码,密码也找个新方式记录一下,以防再出现现在这种忘了密码只能回家续费的情况。同理各种密码都找个跨平台的方式统一管理起来),优惠码`dazhe` | ||
- [ ] 明天带电子纸来上班,所以记得充电! |