feat: add new api requester (#1596)

This commit is contained in:
Junyan Qin (Chin)
2025-08-03 22:30:52 +08:00
committed by GitHub
parent f1ac9c77e6
commit 4a8f5516f6
3 changed files with 48 additions and 0 deletions
@@ -0,0 +1,17 @@
from __future__ import annotations
import typing
import openai
from . import chatcmpl
class NewAPIChatCompletions(chatcmpl.OpenAIChatCompletions):
"""New API ChatCompletion API 请求器"""
client: openai.AsyncClient
default_config: dict[str, typing.Any] = {
'base_url': 'http://localhost:3000/v1',
'timeout': 120,
}