开发者社区 问答 正文

运行报错Can not find api-key. 如何解决?

运行报错Can not find api-key. 如何解决?

展开
收起
提问的橘子 2024-08-08 13:08:22 118 发布于辽宁 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 默认的代码demo没有体现key的设置,在默认里有个常量包,将key设置上就行了
    com.alibaba.dashscope.utils.Constants.Constants.apiKey = "你的key"

    2024-08-16 16:04:21 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等