Spaces:
Paused
Paused
Mirrowel commited on
Commit ·
2683513
1
Parent(s): 2835aec
feat: Set environment variable for logging level in RotatingClient
Browse files
src/rotator_library/client.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import asyncio
|
| 2 |
import json
|
|
|
|
| 3 |
import httpx
|
| 4 |
import litellm
|
| 5 |
from litellm.litellm_core_utils.token_counter import token_counter
|
|
@@ -27,6 +28,7 @@ class RotatingClient:
|
|
| 27 |
with support for both streaming and non-streaming responses.
|
| 28 |
"""
|
| 29 |
def __init__(self, api_keys: Dict[str, List[str]], max_retries: int = 2, usage_file_path: str = "key_usage.json"):
|
|
|
|
| 30 |
litellm.set_verbose = False
|
| 31 |
if not api_keys:
|
| 32 |
raise ValueError("API keys dictionary cannot be empty.")
|
|
|
|
| 1 |
import asyncio
|
| 2 |
import json
|
| 3 |
+
import os
|
| 4 |
import httpx
|
| 5 |
import litellm
|
| 6 |
from litellm.litellm_core_utils.token_counter import token_counter
|
|
|
|
| 28 |
with support for both streaming and non-streaming responses.
|
| 29 |
"""
|
| 30 |
def __init__(self, api_keys: Dict[str, List[str]], max_retries: int = 2, usage_file_path: str = "key_usage.json"):
|
| 31 |
+
os.environ["LITELLM_LOG"] = "ERROR"
|
| 32 |
litellm.set_verbose = False
|
| 33 |
if not api_keys:
|
| 34 |
raise ValueError("API keys dictionary cannot be empty.")
|