You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def test():
llm_cfg = {
# Use the model service provided by DashScope:
# 'model_type': 'qwen_dashscope',
'model': 'qwen2_72b',
# 'model_server': 'dashscope',
# Use your own model service compatible with OpenAI API:
# 'model': 'Qwen',
'model_server': 'http://127.0.0.1:1025/v1',
# (Optional) LLM hyper-paramters:
'generate_cfg': {
'top_p': 0.8,
# 'stream': False
}
}
bot = Assistant(llm=llm_cfg)
messages = [{'role': 'user', 'content': [{'text': '介绍图一'}, {'file': 'https://arxiv.org/pdf/1706.03762.pdf'}]}]
for rsp in bot.run(messages):
print(rsp)
if name == 'main':
test()
The text was updated successfully, but these errors were encountered:
我看代码中也没有Assistant也没有写function_list=tools,但是还是能自动调用工具,为什么
from qwen_agent.agents import Assistant
def test():
llm_cfg = {
# Use the model service provided by DashScope:
# 'model_type': 'qwen_dashscope',
'model': 'qwen2_72b',
# 'model_server': 'dashscope',
# Use your own model service compatible with OpenAI API:
# 'model': 'Qwen',
'model_server': 'http://127.0.0.1:1025/v1',
# (Optional) LLM hyper-paramters:
'generate_cfg': {
'top_p': 0.8,
# 'stream': False
}
}
bot = Assistant(llm=llm_cfg)
messages = [{'role': 'user', 'content': [{'text': '介绍图一'}, {'file': 'https://arxiv.org/pdf/1706.03762.pdf'}]}]
for rsp in bot.run(messages):
print(rsp)
if name == 'main':
test()
The text was updated successfully, but these errors were encountered: