We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let res = await api.sendMessage('“鸡你太美”指的是中国大陆哪位男艺人?给你个提示,他喜欢唱、跳、篮球、Rap') console.log(res.text)
// 传入 parentMessageId 追踪上下文 res = await api.sendMessage('不对,他姓蔡,请重新回答', { parentMessageId: res.id }) console.log(res.text)
return res.text }
报错讯息:AxiosError: Request failed with status code 502" 已排除API问题;也不是代码拷贝有误——因为第一段代码运行正常,甚至第一次就会出现正确答案(蔡徐坤)。
2.laf左下角选择了内置依赖chatgpt后,安装并重启后并如教程中那样没有出现“自定义依赖 chatGPT 版本号”,依然是空白一片。
还望大神拨冗解答,谢谢!
The text was updated successfully, but these errors were encountered:
更新一下: 1)今天上laf,换了容量大一点的服务器,上面的这些问题就都解决了——不需要按教程里介绍的那样安装npm的chatgpt依赖,一样可以在本地复现项目; 2)但问题是:问答没几轮,回答时AI就开始报错。还望左风大神拨冗解答root cause。 谢谢。
Sorry, something went wrong.
No branches or pull requests
import cloud from '@lafjs/cloud'
export async function main(ctx: FunctionContext) {
const { ChatGPTAPI } = await import('chatgpt')
const api = new ChatGPTAPI({ apiKey: cloud.env.CHAT_GPT_API_KEY })
let res = await api.sendMessage('“鸡你太美”指的是中国大陆哪位男艺人?给你个提示,他喜欢唱、跳、篮球、Rap')
console.log(res.text)
// 传入 parentMessageId 追踪上下文
res = await api.sendMessage('不对,他姓蔡,请重新回答', {
parentMessageId: res.id
})
console.log(res.text)
return res.text
}
报错讯息:AxiosError: Request failed with status code 502"
已排除API问题;也不是代码拷贝有误——因为第一段代码运行正常,甚至第一次就会出现正确答案(蔡徐坤)。
2.laf左下角选择了内置依赖chatgpt后,安装并重启后并如教程中那样没有出现“自定义依赖 chatGPT 版本号”,依然是空白一片。
报错讯息:出错了,请重试!
依然排除OpenAI的API问题。
还望大神拨冗解答,谢谢!
The text was updated successfully, but these errors were encountered: