modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
5.19k stars 316 forks source link

fix: 修改DashScopeWrapperBase在初始化模型配置时将空api_key赋值给dashscope.api_key #335

Closed xuanmiss closed 3 months ago

xuanmiss commented 3 months ago

当配置dashscope模型api_key从env中获取时,被覆盖为None

name: Fix the bug of DashScopeWrapperBase api_key about: 当配置dashscope模型api_key从env中获取时,被覆盖为None

Description

修改dashscope_model中的DashScopeWrapperBase在初始化模型配置时没有判空就将api_key赋值给了dashscope.api_key,导致dashscope模型配置中使用env的api_key时报错 image

Checklist

Please check the following items before code is ready to be reviewed.