forked from phoenix/litellm-mirror
fix(timeout.py): import errors
This commit is contained in:
parent
5bd6d6ff4c
commit
ab54262d37
2 changed files with 2 additions and 1 deletions
|
@ -285,6 +285,7 @@ def completion(
|
||||||
try:
|
try:
|
||||||
completion_response = response.json()
|
completion_response = response.json()
|
||||||
except:
|
except:
|
||||||
|
import traceback
|
||||||
raise HuggingfaceError(
|
raise HuggingfaceError(
|
||||||
message=f"Original Response received: {response.text}; Stacktrace: {traceback.format_exc()}", status_code=response.status_code
|
message=f"Original Response received: {response.text}; Stacktrace: {traceback.format_exc()}", status_code=response.status_code
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,7 +17,7 @@ from concurrent import futures
|
||||||
from inspect import iscoroutinefunction
|
from inspect import iscoroutinefunction
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from litellm.error import Timeout
|
from openai.error import Timeout
|
||||||
|
|
||||||
|
|
||||||
def timeout(timeout_duration: float = 0.0, exception_to_raise=Timeout):
|
def timeout(timeout_duration: float = 0.0, exception_to_raise=Timeout):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue