diff --git a/litellm/__init__.py b/litellm/__init__.py index a59484b035..0080e9551c 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -26,6 +26,7 @@ from litellm._logging import ( log_level, ) import re +from .messages import * from litellm.constants import ( DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_INTERVAL_SECONDS, diff --git a/litellm/messages/__init__.py b/litellm/messages/__init__.py new file mode 100644 index 0000000000..1274f768ba --- /dev/null +++ b/litellm/messages/__init__.py @@ -0,0 +1,16 @@ +""" +Interface for Anthropic's messages API + +Use this to call LLMs in Anthropic /messages Request/Response format +""" + +from litellm.llms.anthropic.experimental_pass_through.handler import ( + anthropic_messages as _async_anthropic_messages, +) + + +async def acreate(*args, **kwargs): + """ + Wrapper around Anthropic's messages API + """ + return await _async_anthropic_messages(*args, **kwargs)