Download utils.py from kenken999/litellm: direct link, hf CLI and curl.
- Browser
- Download file 467 Bytes
-
https://huggingface.co/spaces/kenken999/litellm/resolve/main/utils.py
- Command line
-
hf download hf://spaces/kenken999/litellm/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/kenken999/litellm/resolve/main/utils.py
467 Bytes
| import os | |
| import functools | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| def getenv(key, default=0): | |
| return type(default)(os.getenv(key, default)) | |
| def set_env_variables(data): | |
| try: | |
| if "env_variables" in data: | |
| env_variables = data["env_variables"] | |
| for key in env_variables: | |
| os.environ[key] = env_variables[key] | |
| data.pop("env_variables") | |
| except: | |
| pass |