kx-Huang / ChatGPT-on-WeChat

🤖️ Deploy GPT-4o ChatGPT on your WeChat within 2 steps! 两步在云端部署你的微信ChatGPT聊天机器人!🤖️
https://railway.app/template/zKIfYk
ISC License
789 stars 359 forks source link

Railway部署成功,多谢开发者 #3

Closed WiZ1314 closed 4 months ago

WiZ1314 commented 1 year ago

十分感谢开发者。 找了很多项目,目前此项目部署成功

WiZ1314 commented 1 year ago

好像有个小问题,在不添加关键词的时候会莫名发送空字符,并且chatAi会返回语句 📨 Message#Unknown[🗣Contact<AI智能>] 🎯 ChatGPT Triggered: 🤖️ ChatGPT says: JaredW8 Grew up in Tampico Mexico. I have lived in the states since 2006. I studied at the University of Texas at Austin and hold a degree in Mechanical Engineering. I also am a certified yoga instructor. I am a big fan of technology and gadgets, and I also enjoy playing basketball, going to the gym and having fun with friends! ❌ AssertionError [ERR_ASSERTION]: 1204 == 0 📨 Message#Unknown[🗣Contact<AI智能>] 🎯 ChatGPT Triggered: 🤖️ ChatGPT says: import React, { useEffect, useState } from 'react'; import { Table } from "antd"; export const List = ({ list, isLoading }) => { const [dataSource, setDataSource] = useState([]) const [columns] = useState([ { title: 'Label', dataIndex: 'label', key: 'label', }, { title: 'Notes', dataIndex: 'notes', key: 'notes', }, { title: 'Amount', dataIndex: 'amount', key: 'amount', }, { title: 'Type', dataIndex: 'type', key: 'type', }, { title: 'Date', dataIndex: 'date', key: 'date', render: (date) => { if (date) { date = new Date(date); const day = date.getDate() < 10 ?0${date.getDate()}: date.getDate(); const month = date.getMonth() < 10 ?0${date.getMonth()}: date.getMonth(); date = date.getFullYear() + '-' + month + '-' + day; } return ( <span> {date} </span> ) } } ]); useEffect(() => { if (list) { setDataSource(list.map(item => ({ ...item, key: item._id || Math.random() * Math.random() }))) } }, [list]) return ( <Table dataSource={dataSource} columns={columns} loading={isLoading} /> ) } ❌ AssertionError [ERR_ASSERTION]: 1204 == 0

kx-Huang commented 1 year ago

问题可能是我测试的时候忘记把src/chatgpt.ts110行// talker.self() ||注释取消了,导致自己和自己聊天触发wechaty的error,或者chatgpt返回了nonsense。Working on it

kx-Huang commented 1 year ago

Fixed by avoiding self-chat

kx-Huang commented 1 year ago

TODO: look into why self-chatting is usually triggered with unknown message. Please leave a comment if you have any clue.

tuzh6 commented 1 year ago

API调用好像是18美元以内免费吧,大概一条消息多少费用耶

kx-Huang commented 1 year ago

目前是用的这个model,可以根据你的喜好自行调整:

Davinci (Most powerful) $0.0200 /  1K tokens

关于价格,请参考官方文档:

Prices are per 1,000 tokens. You can think of tokens as pieces of words, where 1,000 tokens is about 750 words. This paragraph is 35 tokens.

For more details, please refer to this document.

WiZ1314 commented 1 year ago

chatGPT是一个小型语言模型,专门用于聊天机器人,旨在帮助机器人更好地理解人类的自然语言,并能够更好地回应人类的话语。相比之下,GPT-3是一个更大规模的语言模型,它可以用于多种不同的应用场景,比如文本生成、机器翻译等。在性能上,GPT-3比chatGPT要更强大。

这个api好像用的是GPT-3

kx-Huang commented 1 year ago

你说的对,我之后会修改文档

waahah commented 1 year ago

error.response.headers['set-cookie'] [ 'wxuin=2916762082; Domain=wx.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'wxsid=t8YTWd5VzjzUBZ38; Domain=wx.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'wxloadtime=1671194490; Domain=wx.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'mm_lang=zh-CN; Domain=wx.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'wxuin=2916762082; Domain=.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'webwx_data_ticket=gSd26kRYheZxG7VYxcURgs3a; Domain=.qq.com; Path=/; Expires=Sat, 17-Dec-2022 00:41:30 GMT; Secure', 'webwxuvid=c904b9dc860ea3fc795e4c2fd4d73c90e8d5ac8b013cf94e56edc473b6a8c086; Domain=wx.qq.com; Path=/; Expires=Mon, 13-Dec-2032 12:41:30 GMT; Secure', 'webwx_auth_ticket=CIsBENDf0ZkEGmDLjfTTpgIXHOrOO9i6GIGQG2HVIgNDLRXvMl9N+mzJe9AFnAHH9OZN/yLtqjbv9A4ZB01RHNa48XMcVotBpEP7Lldfs3LabYXFPnwF6BfxDx3T9UB/XZVh1TD9mlBUFwM=; Domain=wx.qq.com; Path=/; Expires=Mon, 13-Dec-2032 12:41:30 GMT; Secure' ]

It works, but the robot answers slowly

kx-Huang commented 1 year ago

It works, but the robot answers slowly

According to OpenAI, the GPT-3 Model is one of the most comprehensive and capable models, but it costs more time and resources to compute. To change the model, please refer to the README Section 2.1.

Also, please check your network. The regular response time is about 5~10s in my environment.

feir3413 commented 1 year ago

请问作者 支持对话吗? 感觉他不会联系上下文 都是每次独立的提问

kx-Huang commented 1 year ago

请问作者 支持对话吗? 感觉他不会联系上下文 都是每次独立的提问

GPT-3模型不支持上下文对话

echofly commented 1 year ago

请问作者 支持对话吗? 感觉他不会联系上下文 都是每次独立的提问

GPT-3模型不支持上下文对话

怎么可能,那人工智障有什么区别

zachzhao1984 commented 1 year ago

在railway部署完,log里的二维码很模糊啊,扫不出来。。。

kx-Huang commented 1 year ago

在railway部署完,log里的二维码很模糊啊,扫不出来。。。

log里有一个链接,点击之后会有清晰的二维码

heloook commented 1 year ago

image 今天怎么部署老是失败呢,我之前成功过

leoncsyang commented 4 months ago

@heloook 问了gpt,原来是安装 nodejs 和 npm 时出现了依赖冲突。改一下docker file。 你可以看看我fork的repo里面dockerfile的配置