mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 03:15:06 +08:00
18 lines
363 B
Python
18 lines
363 B
Python
from __future__ import annotations
|
|
|
|
import typing
|
|
import openai
|
|
|
|
from . import chatcmpl
|
|
|
|
|
|
class TokenPonyChatCompletions(chatcmpl.OpenAIChatCompletions):
|
|
"""TokenPony ChatCompletion API 请求器"""
|
|
|
|
client: openai.AsyncClient
|
|
|
|
default_config: dict[str, typing.Any] = {
|
|
'base_url': 'https://api.tokenpony.cn/v1',
|
|
'timeout': 120,
|
|
}
|