-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat: add FIM completions support to alibailian #2115
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
base: main
Are you sure you want to change the base?
Conversation
能否请教一下通过one-api与直接链接原服务API的FIM的token情况,我这里通过one-api的FIM的token消耗大约是直连的5~10倍 |
@ShuguangSun 你是从哪里看的token消耗 |
root的日志,原服务的查询,一段时间里只有autocomplete |
我是配合vscode的continue使用的 |
one-api 的计费本来就不太准,一大差异应该来自于 input 的 cache 。 自动补全场景的 cache 命中率是非常高的,但是 one-api 不区分 cache 和 input 。 你应该用同一个数据来源对比使用 one-api 和直连的 token 消耗。比如对比使用前后的原服务的账单明细。 |
多谢指教! |
Continue 配置的前后差异只有 apiBase 吗? provider 或者 model 是否有变化? |
只有apibase的差异,从continue在vscode output panel里 |
原来是这个事情。我之前也遇到过,以为是偶然。不过我现在都用的 SiliconFlow 渠道,没再遇到这个问题。 由于 One-Api 看起来现在维护不太积极,我已经换用 One-Hub 了,所以不想在 One-Api 上继续分析这个问题。 不过 One-Hub 看起来也不支持阿里的 FIM ,我回头研究一下测试好再给 One-Hub 提 PR 吧。 总结就是:
|
Related #1522 #1795
百炼本身是支持 FIM (
/v1/completions
) 接口的,但取决于具体模型是否兼容。已知至少qwen-coder-turbo
和qwen2.5-coder-7b-instruct
是能支持的,截图如下:测试命令:
改动很小,一共两行代码一眼就能看完,望尽快合入。