阿里云百炼适配

新增阿里云请求器配置、阿里云模型配置、阿里云令牌配置

新增硅基模型配置
This commit is contained in:
wanjiaju
2025-02-08 10:27:19 +08:00
parent 4d8ebc8c38
commit 9eefbcb6f2
4 changed files with 47 additions and 2 deletions
@@ -0,0 +1,21 @@
from __future__ import annotations
import openai
from . import chatcmpl
from .. import requester
from ....core import app
@requester.requester_class("aliyun-chat-completions")
class AliyunChatCompletions(chatcmpl.OpenAIChatCompletions):
"""Aliyun ChatCompletion API 请求器"""
client: openai.AsyncClient
requester_cfg: dict
def __init__(self, ap: app.Application):
self.ap = ap
self.requester_cfg = self.ap.provider_cfg.data['requester']['aliyun-chat-completions']