Files
LangBot/pkg/provider/modelmgr/requesters/volcarkchatcmpl.py
2025-03-01 00:12:23 +08:00

21 lines
476 B
Python

from __future__ import annotations
import openai
from . import chatcmpl
from .. import requester
from ....core import app
class VolcArkChatCompletions(chatcmpl.OpenAIChatCompletions):
"""火山方舟大模型平台 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']['volcark-chat-completions']