forked from phoenix/litellm-mirror
(feat) openai-proxy add print statements letting users know which callback is switched on
This commit is contained in:
parent
e118ce50e1
commit
907bff33f0
1 changed files with 4 additions and 0 deletions
|
@ -9,18 +9,22 @@ def set_callbacks():
|
||||||
if len(os.getenv("SET_VERBOSE", "")) > 0:
|
if len(os.getenv("SET_VERBOSE", "")) > 0:
|
||||||
if os.getenv("SET_VERBOSE") == "True":
|
if os.getenv("SET_VERBOSE") == "True":
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
print("\033[92mLiteLLM: Switched on verbose logging\033[0m")
|
||||||
else:
|
else:
|
||||||
litellm.set_verbose = False
|
litellm.set_verbose = False
|
||||||
|
|
||||||
### LANGFUSE
|
### LANGFUSE
|
||||||
if (len(os.getenv("LANGFUSE_PUBLIC_KEY", "")) > 0 and len(os.getenv("LANGFUSE_SECRET_KEY", ""))) > 0 or len(os.getenv("LANGFUSE_HOST", "")) > 0:
|
if (len(os.getenv("LANGFUSE_PUBLIC_KEY", "")) > 0 and len(os.getenv("LANGFUSE_SECRET_KEY", ""))) > 0 or len(os.getenv("LANGFUSE_HOST", "")) > 0:
|
||||||
litellm.success_callback = ["langfuse"]
|
litellm.success_callback = ["langfuse"]
|
||||||
|
print("\033[92mLiteLLM: Switched on Langfuse feature\033[0m")
|
||||||
|
|
||||||
## CACHING
|
## CACHING
|
||||||
### REDIS
|
### REDIS
|
||||||
if len(os.getenv("REDIS_HOST", "")) > 0 and len(os.getenv("REDIS_PORT", "")) > 0 and len(os.getenv("REDIS_PASSWORD", "")) > 0:
|
if len(os.getenv("REDIS_HOST", "")) > 0 and len(os.getenv("REDIS_PORT", "")) > 0 and len(os.getenv("REDIS_PASSWORD", "")) > 0:
|
||||||
from litellm.caching import Cache
|
from litellm.caching import Cache
|
||||||
litellm.cache = Cache(type="redis", host=os.getenv("REDIS_HOST"), port=os.getenv("REDIS_PORT"), password=os.getenv("REDIS_PASSWORD"))
|
litellm.cache = Cache(type="redis", host=os.getenv("REDIS_HOST"), port=os.getenv("REDIS_PORT"), password=os.getenv("REDIS_PASSWORD"))
|
||||||
|
print("\033[92mLiteLLM: Switched on Redis caching\033[0m")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def load_router_config(router: Optional[litellm.Router]):
|
def load_router_config(router: Optional[litellm.Router]):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue