Skip to content

Commit e20b79b

Browse files
authored
perf(chatcmpl): remove space from base-url (#1256)
1 parent e04d46d commit e20b79b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/provider/modelmgr/requesters/anthropicmsgs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AnthropicMessages(requester.LLMAPIRequester):
2525
async def initialize(self):
2626

2727
httpx_client = anthropic._base_client.AsyncHttpxClientWrapper(
28-
base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'],
28+
base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'].replace(' ', ''),
2929
# cast to a valid type because mypy doesn't understand our type narrowing
3030
timeout=typing.cast(httpx.Timeout, self.ap.provider_cfg.data['requester']['anthropic-messages']['timeout']),
3131
limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS,

pkg/provider/modelmgr/requesters/chatcmpl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async def initialize(self):
3636

3737
self.client = openai.AsyncClient(
3838
api_key="",
39-
base_url=self.requester_cfg['base-url'],
39+
base_url=self.requester_cfg['base-url'].replace(' ', ''),
4040
timeout=self.requester_cfg['timeout'],
4141
http_client=httpx.AsyncClient(
4242
trust_env=True,

0 commit comments

Comments
 (0)