diff --git a/dist/litellm-0.1.567-py3-none-any.whl b/dist/litellm-0.1.567-py3-none-any.whl new file mode 100644 index 0000000000..57bdc223c0 Binary files /dev/null and b/dist/litellm-0.1.567-py3-none-any.whl differ diff --git a/dist/litellm-0.1.567.tar.gz b/dist/litellm-0.1.567.tar.gz new file mode 100644 index 0000000000..8dd860f857 Binary files /dev/null and b/dist/litellm-0.1.567.tar.gz differ diff --git a/dist/litellm-0.1.568-py3-none-any.whl b/dist/litellm-0.1.568-py3-none-any.whl new file mode 100644 index 0000000000..48b5b3ba2a Binary files /dev/null and b/dist/litellm-0.1.568-py3-none-any.whl differ diff --git a/dist/litellm-0.1.568.tar.gz b/dist/litellm-0.1.568.tar.gz new file mode 100644 index 0000000000..29c389c3e0 Binary files /dev/null and b/dist/litellm-0.1.568.tar.gz differ diff --git a/dist/litellm-0.1.569-py3-none-any.whl b/dist/litellm-0.1.569-py3-none-any.whl new file mode 100644 index 0000000000..2ed21bbb0b Binary files /dev/null and b/dist/litellm-0.1.569-py3-none-any.whl differ diff --git a/dist/litellm-0.1.569.tar.gz b/dist/litellm-0.1.569.tar.gz new file mode 100644 index 0000000000..5af926e6ba Binary files /dev/null and b/dist/litellm-0.1.569.tar.gz differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index 71efd9879a..5f13dda77e 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/tests/test_validate_environment.py b/litellm/tests/test_validate_environment.py new file mode 100644 index 0000000000..a43cd012f3 --- /dev/null +++ b/litellm/tests/test_validate_environment.py @@ -0,0 +1,13 @@ +#### What this tests #### +# This tests the validate environment function + +import sys, os +import traceback + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import time +import litellm + +api_key = litellm.validate_environment() \ No newline at end of file diff --git a/litellm/utils.py b/litellm/utils.py index 416cfc2051..cb914c4c42 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -958,7 +958,7 @@ def load_test_model( "exception": e, } -def validate_environment(self): +def validate_environment(): api_key = None if "OPENAI_API_KEY" in os.environ: api_key = os.getenv("OPENAI_API_KEY") @@ -968,7 +968,7 @@ def validate_environment(self): api_key = os.getenv("REPLICATE_API_KEY") elif "AZURE_API_KEY" in os.environ: api_key = os.getenv("AZURE_API_KEY") - elif "COHERE_API_KEY" in os.getenv("COHERE_API_KEY"): + elif "COHERE_API_KEY" in os.environ: api_key = os.getenv("COHERE_API_KEY") elif "TOGETHERAI_API_KEY" in os.environ: api_key = os.getenv("TOGETHERAI_API_KEY") diff --git a/pyproject.toml b/pyproject.toml index 670bb18602..e18ad9a78c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.567" +version = "0.1.569" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"