-
Notifications
You must be signed in to change notification settings - Fork 394
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Initial Checks
- I have searched GitHub for a duplicate issue and I'm sure this is something new
- I have read and followed the docs & demos and still think this is a bug
- I am confident that the issue is with modelscope-agent (not my code, or another library in the ecosystem)
What happened + What you expected to happen
运行RolePlay, 报错误,KeyError: 'qwen_dashscope'
Versions / Dependencies
master 分支: 4238cf9
Reproduction script
import os
os.environ['DASHSCOPE_API_KEY']="xxxxxxxx" #YOUR_DASHSCOPE_API_KEY
os.environ['AMAP_TOKEN']="yyyyyyyy" #YOUR_AMAP_TOKEN
选用RolePlay 配置agent
from modelscope_agent.agents.role_play import RolePlay # NOQA
role_template = '你扮演一个天气预报助手,你需要查询相应地区的天气,并调用给你的画图工具绘制一张城市的图。'
llm_config = {'model': 'qwen-max', 'model_server': 'dashscope'}
input tool name
function_list = ['amap_weather', 'image_gen']
bot = RolePlay(
function_list=function_list, llm=llm_config, instruction=role_template)
response = bot.run('朝阳区天气怎样?')
text = ''
for chunk in response:
text += chunk
Issue Severity
None
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working