Open pluto-han opened 1 year ago
应该是配置文件没写对,导致读取不到
这是我的配置文件,请问有什么地方需要改动吗
1514142997 @.***
------------------ 原始邮件 ------------------ 发件人: "ashinnotfound/ChatGPT-YourChatRobot" @.>; 发送时间: 2023年4月26日(星期三) 下午3:56 @.>; @.**@.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57)
应该是配置文件没写对,导致读取不到
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
你确定发送完整了吗,我并没有看到(记得将关键信息打码)
方便截图吗 刚刚你cv过来的有些转义 (记得apikey也打码,我把刚才你的回复删了,防止你的apikey泄露)
感谢。下面是截图(不知道能否正常显示)
你是在什么环境下运行的呢
jdk17.0.7
1514142997 @.***
------------------ 原始邮件 ------------------ 发件人: "ashinnotfound/ChatGPT-YourChatRobot" @.>; 发送时间: 2023年4月26日(星期三) 下午4:59 @.>; @.**@.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57)
你是在什么环境下运行的呢
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
jar包运行还是ide里
在shell终端使用java -jar命令运行
1514142997 @.***
------------------ 原始邮件 ------------------ 发件人: "xun @.>; 发送时间: 2023年4月26日(星期三) 下午5:02 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57)
jar包运行还是ide里
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
貌似你的配置没问题,更像是jar包没有读取到application.yml文件
你的配置文件名是application.yml吗,我看你截图似乎没有后缀.yml
是yml后缀,我没有设置'显示拓展名'。我怀疑就是我的api有问题,我给其他gpt项目使用我的key,也出现了问题
1514142997 @.***
------------------ 原始邮件 ------------------ 发件人: "xun @.>; 发送时间: 2023年4月26日(星期三) 下午5:15 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57)
你的配置文件名是application.yml吗,我看你截图似乎没有后缀.yml
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
是yml后缀,我没有设置'显示拓展名'。我怀疑就是我的api有问题,我给其他gpt项目使用我的key,也出现了问题 1514142997 @. … ------------------ 原始邮件 ------------------ 发件人: "xun @.>; 发送时间: 2023年4月26日(星期三) 下午5:15 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ashinnotfound/ChatGPT-YourChatRobot] 请问为什么getApiKey()是null (Issue #57) 你的配置文件名是application.yml吗,我看你截图似乎没有后缀.yml — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
jar包和application.yml在同级目录下吗,我刚才尝试把它删除后缀.yml或者把application.yml放于不同级目录,出现了和你一样的报错。应该不是api的问题,因为它就没读取到apikey,而且如果是apikey的问题,报错也不会是这个
我的是这样子的,需要做什么更改吗
我的是这样子的,需要做什么更改吗
这我也不知道为什么了😐
终端提示:Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "com.ashin.config.ChatgptConfig.getApiKey()" is null 不知道为什么会这样,是因为key被封了吗 不知道该如何解决QAQ