DSPy: The framework for programming—not prompting—language models
Python
lm.py: disable telemetry in litellm
jacka707b0004a53
diff --git a/dspy/clients/lm.py b/dspy/clients/lm.pyindex ccc730f2b..e00dd7f5e 100644--- a/dspy/clients/lm.py+++ b/dspy/clients/lm.py@@ -7,7 +7,10 @@ try:import warningswith warnings.catch_warnings():warnings.filterwarnings("ignore", category=UserWarning)- import litellm+ if "LITELLM_LOCAL_MODEL_COST_MAP" not in os.environ:+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"+ import litellm+ litellm.telemetry = Falsefrom litellm.caching import Cachedisk_cache_dir = os.environ.get('DSPY_CACHEDIR') or os.path.join(Path.home(), '.dspy_cache')