perf(chatcmpl): remove space from base-url (#1256)

This commit is contained in:
Junyan Qin (Chin)
2025-03-30 23:59:55 +08:00
committed by GitHub
parent e04d46db2c
commit e20b79b0ed
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ class AnthropicMessages(requester.LLMAPIRequester):
async def initialize(self):
httpx_client = anthropic._base_client.AsyncHttpxClientWrapper(
base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'],
base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'].replace(' ', ''),
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=typing.cast(httpx.Timeout, self.ap.provider_cfg.data['requester']['anthropic-messages']['timeout']),
limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS,

View File

@@ -36,7 +36,7 @@ class OpenAIChatCompletions(requester.LLMAPIRequester):
self.client = openai.AsyncClient(
api_key="",
base_url=self.requester_cfg['base-url'],
base_url=self.requester_cfg['base-url'].replace(' ', ''),
timeout=self.requester_cfg['timeout'],
http_client=httpx.AsyncClient(
trust_env=True,