diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py index 448716247..710df9e78 100644 --- a/litellm/tests/test_completion.py +++ b/litellm/tests/test_completion.py @@ -436,19 +436,21 @@ def test_completion_sagemaker(): pytest.fail(f"Error occurred: {e}") -def test_completion_custom_api_base(): - try: - response = completion( - model="custom/meta-llama/Llama-2-13b-hf", - messages=messages, - temperature=0.2, - max_tokens=10, - api_base="https://api.autoai.dev/inference", - ) - # Add any assertions here to check the response - print("got response\n", response) - except Exception as e: - pytest.fail(f"Error occurred: {e}") +# def test_completion_custom_api_base(): +# try: +# response = completion( +# model="custom/meta-llama/Llama-2-13b-hf", +# messages=messages, +# temperature=0.2, +# max_tokens=10, +# api_base="https://api.autoai.dev/inference", +# request_timeout=300, +# ) +# # Add any assertions here to check the response +# print("got response\n", response) +# except Exception as e: +# pytest.fail(f"Error occurred: {e}") + # test_completion_custom_api_base() # def test_vertex_ai(): diff --git a/litellm/timeout.py b/litellm/timeout.py index d88e16c96..75f29b3c9 100644 --- a/litellm/timeout.py +++ b/litellm/timeout.py @@ -38,6 +38,8 @@ def timeout(timeout_duration: float = 0.0, exception_to_raise=Timeout): local_timeout_duration = timeout_duration if "force_timeout" in kwargs and kwargs["force_timeout"] is not None: local_timeout_duration = kwargs["force_timeout"] + elif "request_timeout" in kwargs and kwargs["request_timeout"] is not None: + local_timeout_duration = kwargs["request_timeout"] try: result = future.result(timeout=local_timeout_duration) except futures.TimeoutError: diff --git a/pyproject.toml b/pyproject.toml index 90959b585..e038a9390 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.537" +version = "0.1.538" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"