mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08: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):
|
||||
|
||||
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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user