forked from phoenix/litellm-mirror
fix dbricks get_async_httpx_client
This commit is contained in:
parent
0ee9f0fa44
commit
f7f9e8c41f
1 changed files with 8 additions and 2 deletions
|
@ -393,7 +393,10 @@ class DatabricksChatCompletion(BaseLLM):
|
|||
if timeout is None:
|
||||
timeout = httpx.Timeout(timeout=600.0, connect=5.0)
|
||||
|
||||
self.async_handler = AsyncHTTPHandler(timeout=timeout)
|
||||
self.async_handler = get_async_httpx_client(
|
||||
llm_provider=litellm.LlmProviders.DATABRICKS,
|
||||
params={"timeout": timeout},
|
||||
)
|
||||
|
||||
try:
|
||||
response = await self.async_handler.post(
|
||||
|
@ -610,7 +613,10 @@ class DatabricksChatCompletion(BaseLLM):
|
|||
response = None
|
||||
try:
|
||||
if client is None or isinstance(client, AsyncHTTPHandler):
|
||||
self.async_client = AsyncHTTPHandler(timeout=timeout) # type: ignore
|
||||
self.async_client = get_async_httpx_client(
|
||||
llm_provider=litellm.LlmProviders.DATABRICKS,
|
||||
params={"timeout": timeout},
|
||||
)
|
||||
else:
|
||||
self.async_client = client
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue