mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 22:29:19 +08:00
feat: 支持 Completions/Responses 双协议,并在同选型下续链加速
This commit is contained in:
@@ -9,6 +9,7 @@ import httpx
|
||||
from config.settings import Settings
|
||||
from domain.models import LlmRuntimeConfig
|
||||
from domain.ports import LlmRuntimeGateway
|
||||
from infrastructure.llm.api_style import normalize_api_style
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -53,6 +54,9 @@ class ServerLlmRuntimeGateway(LlmRuntimeGateway):
|
||||
for k, v in (data.get("extraHeaders") or {}).items()
|
||||
},
|
||||
context_window=_optional_positive_int(data.get("contextWindow")),
|
||||
api_style=normalize_api_style(
|
||||
None if data.get("apiStyle") is None else str(data.get("apiStyle"))
|
||||
),
|
||||
)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
|
||||
Reference in New Issue
Block a user