mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-16 15:30:59 +00:00
perf(chatcmpl): remove space from base-url (#1256)
This commit is contained in:
committed by
GitHub
parent
e04d46db2c
commit
e20b79b0ed
@@ -25,7 +25,7 @@ class AnthropicMessages(requester.LLMAPIRequester):
|
|||||||
async def initialize(self):
|
async def initialize(self):
|
||||||
|
|
||||||
httpx_client = anthropic._base_client.AsyncHttpxClientWrapper(
|
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
|
# 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']),
|
timeout=typing.cast(httpx.Timeout, self.ap.provider_cfg.data['requester']['anthropic-messages']['timeout']),
|
||||||
limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS,
|
limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class OpenAIChatCompletions(requester.LLMAPIRequester):
|
|||||||
|
|
||||||
self.client = openai.AsyncClient(
|
self.client = openai.AsyncClient(
|
||||||
api_key="",
|
api_key="",
|
||||||
base_url=self.requester_cfg['base-url'],
|
base_url=self.requester_cfg['base-url'].replace(' ', ''),
|
||||||
timeout=self.requester_cfg['timeout'],
|
timeout=self.requester_cfg['timeout'],
|
||||||
http_client=httpx.AsyncClient(
|
http_client=httpx.AsyncClient(
|
||||||
trust_env=True,
|
trust_env=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user