Skip to content

Commit

Permalink
vault backup: 2024-09-18 18:03:59
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgzn committed Sep 18, 2024
1 parent 0a4ca04 commit 303f31f
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 16 deletions.
43 changes: 43 additions & 0 deletions .obsidian/hotkeys.json
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"
}
]
}
18 changes: 9 additions & 9 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"state": {
"type": "markdown",
"state": {
"file": "_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md",
"file": "assets/draft/2024-09-18-日记.md",
"mode": "source",
"source": false
}
Expand Down Expand Up @@ -85,7 +85,7 @@
"state": {
"type": "backlink",
"state": {
"file": "_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md",
"file": "assets/draft/2024-09-18-日记.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -102,7 +102,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md",
"file": "assets/draft/2024-09-18-日记.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -125,7 +125,7 @@
"state": {
"type": "outline",
"state": {
"file": "_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md"
"file": "assets/draft/2024-09-18-日记.md"
}
}
},
Expand Down Expand Up @@ -175,15 +175,18 @@
},
"active": "d80940e85a1e5ed1",
"lastOpenFiles": [
"_posts/pool/2024-09-14.md",
"assets/draft",
"_posts/pool/2024-09-05-日记.md",
"assets/draft/2024-09-18-日记.md",
"_posts/pool/2024-09-14-微信引入个人机器人踩雷篇.md",
"_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md",
"assets/Excalidraw/Drawing 2024-09-13 14.52.57.excalidraw.md",
"Excalidraw/Drawing 2024-09-13 14.50.36.excalidraw.md",
"Excalidraw/Drawing 2024-09-13 14.49.55.excalidraw.md",
"Excalidraw",
"_posts/pool/2024-09-13.md",
"Excalidraw/Drawing 2024-09-13 14.48.27.excalidraw.md",
"assets/Excalidraw",
"_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md",
"_posts/engineering/2024-08-13-脚本内指定GPU部署.md",
"_posts/engineering/2024-08-13-两台Linux机器传文件.md",
"_posts/engineering/2024-08-13-conda环境库信息导出与复原.md",
Expand All @@ -204,9 +207,6 @@
"assets/img/Dingtalk_20240906103705.jpg",
"assets/img/Dingtalk_20240906094335.jpg",
"assets/img/Dingtalk_20240906103403.jpg",
"_posts/pool/2024-09-05-日记.md",
"_posts/coding/2024-08-13-python爬虫图解.md",
"_posts/coding/2024-08-13-python开多进程.md",
"assets/img",
"assets/新建文件夹",
"_template"
Expand Down
41 changes: 41 additions & 0 deletions _posts/pool/2024-09-14-微信引入个人机器人踩雷篇.md
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`
7 changes: 0 additions & 7 deletions _posts/pool/2024-09-14.md

This file was deleted.

11 changes: 11 additions & 0 deletions assets/draft/2024-09-18-日记.md
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`
- [ ] 明天带电子纸来上班,所以记得充电!

0 comments on commit 303f31f

Please sign in to comment.