adding testing to make sure litedebugger is opt-in only

This commit is contained in:
Krrish Dholakia 2023-08-30 09:55:33 -07:00
parent 894776e1c4
commit eb33e1fa71
4 changed files with 11 additions and 10 deletions

View file

@ -72,16 +72,17 @@ def test_completion_claude_stream():
pytest.fail(f"Error occurred: {e}") pytest.fail(f"Error occurred: {e}")
# def test_completion_hf_api(): def test_completion_hf_api():
# try: try:
# user_message = "write some code to find the sum of two numbers" user_message = "write some code to find the sum of two numbers"
# messages = [{ "content": user_message,"role": "user"}] messages = [{ "content": user_message,"role": "user"}]
# response = completion(model="stabilityai/stablecode-completion-alpha-3b-4k", messages=messages, custom_llm_provider="huggingface") response = completion(model="stabilityai/stablecode-completion-alpha-3b-4k", messages=messages, custom_llm_provider="huggingface", logger_fn=logger_fn)
# # Add any assertions here to check the response # Add any assertions here to check the response
# print(response) print(response)
# except Exception as e: except Exception as e:
# pytest.fail(f"Error occurred: {e}") pytest.fail(f"Error occurred: {e}")
test_completion_hf_api()
# def test_completion_hf_deployed_api(): # def test_completion_hf_deployed_api():
# try: # try:
# user_message = "There's a llama in my garden 😱 What should I do?" # user_message = "There's a llama in my garden 😱 What should I do?"

View file

@ -438,7 +438,7 @@ def client(original_function):
litellm.email is not None litellm.email is not None
or os.getenv("LITELLM_EMAIL", None) is not None or os.getenv("LITELLM_EMAIL", None) is not None
or litellm.token is not None or litellm.token is not None
or os.getenv("LITELLM_TOKEN", None) or os.getenv("LITELLM_TOKEN", None) is not None
): # add to input, success and failure callbacks if user is using hosted product ): # add to input, success and failure callbacks if user is using hosted product
get_all_keys() get_all_keys()
if "lite_debugger" not in callback_list and litellm.logging: if "lite_debugger" not in callback_list and litellm.logging: