allow using litellm.messages.acreate and litellm.messages.create

This commit is contained in:
Ishaan Jaff
2025-03-26 17:05:38 -07:00
parent 968ef4a299
commit 07dce8bed3
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -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,
+16
View File
@@ -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)