mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
阿里云百炼适配
新增阿里云请求器配置、阿里云模型配置、阿里云令牌配置 新增硅基模型配置
This commit is contained in:
@@ -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']
|
||||
Reference in New Issue
Block a user