fix dbricks get_async_httpx_client

This commit is contained in:
Ishaan Jaff 2024-11-21 10:21:06 -08:00
parent 0ee9f0fa44
commit f7f9e8c41f

View file

@ -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