From ceab3cfa7ce6e9856fbf0b02dbfa4aefb2b90530 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 31 Mar 2025 16:52:39 -0700 Subject: [PATCH] fix mypy lint errors --- litellm/__init__.py | 2 +- litellm/{anthropic => anthropic_interface}/__init__.py | 0 .../messages/__init__.py | 0 litellm/anthropic_interface/readme.md | 9 +++++++++ 4 files changed, 10 insertions(+), 1 deletion(-) rename litellm/{anthropic => anthropic_interface}/__init__.py (100%) rename litellm/{anthropic => anthropic_interface}/messages/__init__.py (100%) create mode 100644 litellm/anthropic_interface/readme.md diff --git a/litellm/__init__.py b/litellm/__init__.py index 4db5bff11b..9997b9a8ac 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -1026,7 +1026,6 @@ from .proxy.proxy_cli import run_server from .router import Router from .assistants.main import * from .batches.main import * -from .anthropic import * from .batch_completion.main import * # type: ignore from .rerank_api.main import * from .llms.anthropic.experimental_pass_through.messages.handler import * @@ -1039,6 +1038,7 @@ from .cost_calculator import response_cost_calculator, cost_per_token ### ADAPTERS ### from .types.adapter import AdapterItem +import litellm.anthropic_interface as anthropic adapters: List[AdapterItem] = [] diff --git a/litellm/anthropic/__init__.py b/litellm/anthropic_interface/__init__.py similarity index 100% rename from litellm/anthropic/__init__.py rename to litellm/anthropic_interface/__init__.py diff --git a/litellm/anthropic/messages/__init__.py b/litellm/anthropic_interface/messages/__init__.py similarity index 100% rename from litellm/anthropic/messages/__init__.py rename to litellm/anthropic_interface/messages/__init__.py diff --git a/litellm/anthropic_interface/readme.md b/litellm/anthropic_interface/readme.md new file mode 100644 index 0000000000..69099dd634 --- /dev/null +++ b/litellm/anthropic_interface/readme.md @@ -0,0 +1,9 @@ +## Use LLM API endpoints in Anthropic Interface + +Note: This is called `anthropic_interface` because `anthropic` is a known python package and was failing mypy type checking. + +### Usage + +```python +import litellm.anthropic_interface as anthropic +``` \ No newline at end of file