mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 21:06:03 +00:00
20 lines
419 B
Python
20 lines
419 B
Python
from __future__ import annotations
|
|
|
|
import typing
|
|
import openai
|
|
|
|
from . import chatcmpl
|
|
from .. import requester
|
|
from ....core import app
|
|
|
|
|
|
class SiliconFlowChatCompletions(chatcmpl.OpenAIChatCompletions):
|
|
"""SiliconFlow ChatCompletion API 请求器"""
|
|
|
|
client: openai.AsyncClient
|
|
|
|
default_config: dict[str, typing.Any] = {
|
|
'base_url': 'https://api.siliconflow.cn/v1',
|
|
'timeout': 120,
|
|
}
|