Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add FIM completions support to alibailian #2115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PMExtra
Copy link

@PMExtra PMExtra commented Feb 19, 2025

Related #1522 #1795

百炼本身是支持 FIM (/v1/completions) 接口的,但取决于具体模型是否兼容。已知至少 qwen-coder-turboqwen2.5-coder-7b-instruct 是能支持的,截图如下:

image

Edit: 截图意外泄露API-Key了,已经回收该Key😂

测试命令:

curl -X POST "https://dashscope.aliyuncs.com/compatible-mode/v1/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-token>" \
  -d '{
        "model": "qwen-coder-turbo",
        "prompt": "def fib(a):",
        "suffix": "    return fib(a-1) + fib(a-2)",
        "max_tokens": 128
      }'

改动很小,一共两行代码一眼就能看完,望尽快合入。

@PMExtra PMExtra marked this pull request as ready for review February 19, 2025 15:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant