zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
31.09k stars 8.11k forks source link

通义千问视觉理解大模型Qwen-VL接入错误,正确方法应该如何做? #2287

Closed Realybig closed 6 days ago

Realybig commented 2 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

MacOS

运行的python版本是?

other

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

1、在 common/const.pyMODEL_LIST 中加入 qwen-vl-max-0809 2、在 config.json 中加入

"model": "qwen-vl-max-0809",
"dashscope_api_key": "sk-dae2*******9cb4**********94bfd097a",
"bot_type": "dashscope",

然后正常运行,出现下面问题

问题描述 😯

Start auto replying.
[INFO][2024-09-05 00:33:49][bridge.py:68] - create bot dashscope for chat
[INFO][2024-09-05 00:33:49][dashscope_bot.py:35] - [DASHSCOPE] query=你是什么模型
[ERROR][2024-09-05 00:33:49][dashscope_bot.py:111] - 'qwen-vl-max-0809'
Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'
[ERROR][2024-09-05 00:33:49][dashscope_bot.py:111] - 'qwen-vl-max-0809'
Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'
[ERROR][2024-09-05 00:33:49][dashscope_bot.py:111] - 'qwen-vl-max-0809'
Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/bot/dashscope/dashscope_bot.py", line 87, in reply_text
    dashscope_models[self.model_name],
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'qwen-vl-max-0809'
[INFO][2024-09-05 00:33:50][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
我现在有点累了,等会再来吧), receiver=@499d064443454444a603fde46487d837
Unexpected sync check result: window.synccheck={retcode:"1102",selector:"0"}
^C[INFO][2024-09-05 09:36:44][app.py:19] - signal 2 received, exiting...
[INFO][2024-09-05 09:36:44][config.py:234] - [Config] User datas saved.
Traceback (most recent call last):
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/app.py", line 71, in <module>
    run()
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/app.py", line 64, in run
    time.sleep(1)
  File "/Users/olivia/MyObjects/2024Projects/project-jobs/chatgpt-on-wechat/app.py", line 22, in func
    return old_handler(_signo, _stack_frame)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

终端日志 📒

<此处粘贴终端日志>
6vision commented 1 month ago

还不支持qwen的视觉模型

ejohnyu commented 2 weeks ago

const.py里没有这个模型