Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ModelScope API-Inference #2549

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

yrk111222
Copy link

@yrk111222 yrk111222 commented Mar 13, 2025

新增ModelScope API-Inference支持的模型资源,目前支持的对话模型列表和文生图模型列表较多,部分对话模型列表如下:

["Qwen/QwQ-32B", "deepseek-ai/DeepSeek-R1", "deepseek-ai/DeepSeek-V3", "Qwen/Qwen2.5-Coder-32B-Instruct", "Qwen/Qwen2.5-Coder-14B-Instruct", "Qwen/Qwen2.5-Coder-7B-Instruct", "Qwen/Qwen2.5-72B-Instruct", "Qwen/Qwen2.5-32B-Instruct", "Qwen/Qwen2.5-14B-Instruct", "Qwen/Qwen2.5-7B-Instruct", "Qwen/QwQ-32B-Preview"]

更多模型可以参考:modelscope-api
API_KEY获取:在魔搭社区用户中心免费获取使用,需要绑定阿里云账号,参考文档
配置文件修改(需要文生图功能要配置“text_to_image参数”,更多文生图模型ID可参考文生图模型库):

  "bot_type": "modelscope",
  "model": "Qwen/QwQ-32B",
  "modelscope_api_key": "your_api_key",
  "modelscope_base_url": "https://api-inference.modelscope.cn/v1/chat/completions",
  "text_to_image": "MusePublic/489_ckpt_FLUX_1",

@6vision
Copy link
Collaborator

6vision commented Mar 14, 2025

感謝PR~

建议

  • common/const.py文件新增参数MODELSCOPE_MODEL_LIST统一存放所支持的模型,方便查看和维护。
  • 并追加到MODEL_LIST列表,以便对话时使用#model model_name指令直接切换模型。

参考GITEE_AI_MODEL_LIST

@yrk111222
Copy link
Author

感謝PR~

建议

  • common/const.py文件新增参数MODELSCOPE_MODEL_LIST统一存放所支持的模型,方便查看和维护。
  • 并追加到MODEL_LIST列表,以便对话时使用#model model_name指令直接切换模型。

参考GITEE_AI_MODEL_LIST

感谢建议🙏~,请再次review下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants