Files
MoFin/venv/lib/python3.12/site-packages/litellm/integrations/otel/presets/base.py
T
知微 fa45d8aa5f fix: 小果地址统一node122(兼容LAN+EasyTier)
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
  Privoxy对node122:18003返回500,直连正常
2026-06-30 02:56:35 +08:00

26 lines
932 B
Python

"""Preset interface.
A preset is a callable that reads its integration's env vars and produces an
:class:`OpenTelemetryV2Config` (exporter list + mapper-name list + resource
attributes). This ``Protocol`` pins that contract so ``PRESET_BY_CALLBACK`` and
the factory in ``litellm_logging`` are type-checked structurally against it,
matching the ``AttributeMapper`` protocol the mappers use.
"""
from typing import Protocol, runtime_checkable
from litellm.integrations.otel.model.config import OpenTelemetryV2Config
@runtime_checkable
class Preset(Protocol):
"""Reads an integration's env config and returns an ``OpenTelemetryV2Config``.
``config_overrides`` lets one preset layer onto another's config (or onto
test-supplied defaults); the factory calls presets with no arguments.
"""
def __call__(
self, *, config_overrides: OpenTelemetryV2Config | None = None
) -> OpenTelemetryV2Config: ...