all fixes to linting

This commit is contained in:
ishaan-jaff 2023-08-18 11:56:44 -07:00
parent 5e7d22512d
commit 1bb2aefea1
8 changed files with 44 additions and 34 deletions

View file

@ -21,8 +21,8 @@ user_message = "Hello, how are you?"
messages = [{"content": user_message, "role": "user"}]
## Test 1: Setting key dynamically
temp_key = os.environ.get("ANTHROPIC_API_KEY")
os.environ["ANTHROPIC_API_KEY"]: str = "bad-key"
temp_key = os.environ.get("ANTHROPIC_API_KEY", "")
os.environ["ANTHROPIC_API_KEY"] = "bad-key"
# test on openai completion call
try:
response = completion(
@ -39,7 +39,7 @@ os.environ["ANTHROPIC_API_KEY"] = temp_key
## Test 2: Setting key via __init__ params
litellm.anthropic_key: str = os.environ.get("ANTHROPIC_API_KEY")
litellm.anthropic_key = os.environ.get("ANTHROPIC_API_KEY", "")
os.environ.pop("ANTHROPIC_API_KEY")
# test on openai completion call
try: