cosin2077 / chaty Goto Github PK
View Code? Open in Web Editor NEWone line code, satisfied all your ChatGPT imagination✨✨✨
one line code, satisfied all your ChatGPT imagination✨✨✨
机器人报错“遇到问题了,请稍后再试,或输入 重置 试试!”但是重置之后,输入任何内容还是继续报错
举个例子,我们可以给api加个设置system的参数。
headers.origin = 'https://app.uniswap.org'
为啥要设置uniswap。。。
[root@ip-172-31-30-113 ~]# chaty run wechat runWechatService... / starting to install pkgs for wechat service....../root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174 err = new Error(
Command failed: ${joinedCmd}${output}`);
^
Error: Command failed: npm install
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm ERR! code 127
npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown
npm ERR! command failed
npm ERR! command sh -c -- node-gyp-build
npm ERR! sh: node-gyp-build: command not found
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log
at makeError (/root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 127,
stdout: '',
stderr: 'npm WARN deprecated [email protected]: this library is no longer supported\n' +
'npm WARN deprecated [email protected]: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.\n' +
'npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.\n' +
'npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142\n' +
'npm ERR! code 127\n' +
'npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' +
'npm ERR! command failed\n' +
'npm ERR! command sh -c -- node-gyp-build\n' +
'npm ERR! sh: node-gyp-build: command not found\n' +
'\n' +
'npm ERR! A complete log of this run can be found in:\n' +
'npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log\n',
failed: true,
signal: null,
cmd: 'npm install',
timedOut: false,
killed: false
}`
npm v16.19.1
amazon linux
root权限
随着gpt4模型api的开放,能否在项目中加入模型的可选择性~
install node-v18.15.0-x64.msi, and no problem when install package.
run "chaty" but encountered the following error. Please help, thanks,
C:\user\nodejs>npm i -g ichaty
changed 137 packages in 5s
20 packages are looking for funding
run `npm fund` for details
C:\nodejs>chaty
C:\Users\user\AppData\Roaming\npm\node_modules\ichaty\node_modules\fs-extra\lib\index.js:5
...require('./fs'),
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\ichaty\lib\src\main\prepare\dir.js:3:18)
微信登陆后什么事也没发生,这里使用bot的路径可以详细描述下吗
请问扫码后这个报错是啥原因
❯ chaty run wechat
runWechatService...
✔ install pkgs for wechat service succeed!
\ starting build pkgs for wechat service......
> [email protected] build
> tsc
✔ build pkgs for wechat service succeed!
> [email protected] start
> node dist/index
[qrcode]
uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
at Object.equal (/home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
at /home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
' at Object.equal (/home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
' at /home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
uncaughtException GError: WatchdogAgent reset: lastFood: "{"data":"syncCheck()","timeoutMi
lliseconds":60000}"
at Watchdog.reset (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wechat/n
ode_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
at Watchdog.emit (node:events:513:28)
at Timeout._onTimeout (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wech
at/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 2,
details: 'Error: WatchdogAgent reset: lastFood: "{"data":"syncCheck()","timeoutMilliseco
nds":60000}"\n' +
' at Watchdog.reset (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wec
hat/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)\n' +
' at Watchdog.emit (node:events:513:28)\n' +
' at Timeout._onTimeout (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services
/wechat/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)\n' +
' at listOnTimeout (node:internal/timers:559:17)\n' +
' at processTimers (node:internal/timers:502:7)'
}
错误如下:
https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FoYlBGtR2Ag%3D%3D
uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
at Object.equal (/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
at /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
' at Object.equal (/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
' at /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
uncaughtException GError [TypeError]: Cannot read properties of undefined (reading 'status') at /opt/homebrew/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:170:30 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 2, details: "TypeError: Cannot read properties of undefined (reading 'status')\n" + ' at /opt/homebrew/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:170:30\n' + ' at processTicksAndRejections (node:internal/process/task_queues:96:5)' }
node: v16.15.0
macOS: 13.2.1
半个月前自己在linux上安装运行成功过,但是今天在window 系统全局安装了ichaty,但是执行chaty命令会报错
chaty --help
✖ check chaty version error: Request failed with status code 413
✖ check chaty version timeout
ichaty 安装版本 0.1.21
,检查了本地相关配置
.npmrc文件如下
registry=https://registry.npmmirror.com/
ichaty .env文件内容如下
WEB_PORT=9522
NODE_PORT=9523
看了下源码有检查版本的代码,是不是请求的https://registry.npmmirror.com/ichaty
这个文件太大导致的?
chaty checkVersion... +0ms
✖ check chaty version error: Request failed with status code 413
chaty Request failed with status code 413 +187ms
✖ check chaty version timeout
Node v18.14.2
macOS 13.2.1
例如本机的 http代理: 127.0.0.1:7788
本机的 socks代理: 127.0.0.1:8899
要怎么配置呢?
比如在 ~/.chaty/.env里配置CHATY_PROXY为 http://127.0.0.1:7788 是不能正常使用的,好像是不同类型的代理。
uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
at Object.equal (/usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
at /usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
' at Object.equal (/usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
' at /usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
login succeed!
now you can try chaty run web/node/command/etc...
[root@ecs-d687 ~]# chaty run command
run command-line bot service...
please input your question: hello
hello
Request failed with status code 401
please input your question: where are you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.