diff --git a/dist/litellm-0.1.486-py3-none-any.whl b/dist/litellm-0.1.486-py3-none-any.whl new file mode 100644 index 000000000..6b84cd492 Binary files /dev/null and b/dist/litellm-0.1.486-py3-none-any.whl differ diff --git a/dist/litellm-0.1.486.tar.gz b/dist/litellm-0.1.486.tar.gz new file mode 100644 index 000000000..bfc0b5a09 Binary files /dev/null and b/dist/litellm-0.1.486.tar.gz differ diff --git a/litellm/__init__.py b/litellm/__init__.py index c1d19d0c6..e70f1b544 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -23,6 +23,7 @@ vertex_location: Optional[str] = None togetherai_api_key: Optional[str] = None baseten_key: Optional[str] = None use_client = False +logging = True caching = False caching_with_models = False # if you want the caching key to be model + prompt model_alias_map: Dict[str, str] = {} diff --git a/litellm/__pycache__/__init__.cpython-311.pyc b/litellm/__pycache__/__init__.cpython-311.pyc index e9bca425b..df608813d 100644 Binary files a/litellm/__pycache__/__init__.cpython-311.pyc and b/litellm/__pycache__/__init__.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index 81e65b063..4e033d0a4 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_streaming.py b/litellm/tests/test_streaming.py index 2c66ebef6..6cad61502 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -9,7 +9,7 @@ sys.path.insert( ) # Adds the parent directory to the system path import litellm from litellm import completion - +litellm.logging = False litellm.set_verbose = True score = 0 diff --git a/litellm/utils.py b/litellm/utils.py index 7474ac03e..296ec308e 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -334,16 +334,17 @@ def client(original_function): global callback_list, add_breadcrumb, user_logger_fn if litellm.email is not None or os.getenv("LITELLM_EMAIL", None) is not None or litellm.token is not None or os.getenv("LITELLM_TOKEN", None): # add to input, success and failure callbacks if user is using hosted product get_all_keys() - if "lite_debugger" not in callback_list: + if "lite_debugger" not in callback_list and litellm.logging: litellm.input_callback.append("lite_debugger") litellm.success_callback.append("lite_debugger") litellm.failure_callback.append("lite_debugger") elif litellm.use_client: # create a litellm token for users litellm.token = get_or_generate_uuid() - litellm.input_callback.append("lite_debugger") - litellm.success_callback.append("lite_debugger") - litellm.failure_callback.append("lite_debugger") + if litellm.logging: + litellm.input_callback.append("lite_debugger") + litellm.success_callback.append("lite_debugger") + litellm.failure_callback.append("lite_debugger") if ( len(litellm.input_callback) > 0 or len(litellm.success_callback) > 0 diff --git a/pyproject.toml b/pyproject.toml index 839349a27..8457f5e86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.486" +version = "0.1.487" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"