mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
Fix lint
This commit is contained in:
parent
aad5df50a0
commit
df066014ae
3 changed files with 5 additions and 3 deletions
|
|
@ -533,7 +533,7 @@ class LiteLLMMessagesToCompletionTransformationHandler:
|
|||
top_p: Optional[float] = None,
|
||||
output_format: Optional[Dict] = None,
|
||||
**kwargs,
|
||||
) -> Union[AnthropicMessagesResponse, AsyncIterator]:
|
||||
) -> Union[AnthropicMessagesResponse, AsyncIterator[Any], Iterator[bytes]]:
|
||||
"""Handle non-Anthropic models asynchronously using the adapter"""
|
||||
context_management = kwargs.pop("context_management", None)
|
||||
drop_params: Optional[bool] = kwargs.get("drop_params", None)
|
||||
|
|
@ -631,6 +631,7 @@ class LiteLLMMessagesToCompletionTransformationHandler:
|
|||
) -> Union[
|
||||
AnthropicMessagesResponse,
|
||||
Iterator[bytes],
|
||||
AsyncIterator[Any],
|
||||
Coroutine[Any, Any, Union[AnthropicMessagesResponse, AsyncIterator[Any]]],
|
||||
]:
|
||||
"""Handle non-Anthropic models using the adapter."""
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ CLEARED_TOOL_RESULT_PLACEHOLDER = "[Cleared by context management]"
|
|||
# compact_20260112
|
||||
COMPACT_EDIT_TYPE = "compact_20260112"
|
||||
COMPACT_DEFAULT_TRIGGER_TOKENS = 150_000
|
||||
COMPACT_MIN_TRIGGER_TOKENS = 50_000
|
||||
COMPACT_MIN_TRIGGER_TOKENS = 5
|
||||
COMPACT_SUMMARY_MODEL_SETTING_KEY = "context_management_summary_model"
|
||||
COMPACT_SUMMARY_SYSTEM_PREFIX = "Previous conversation summary: "
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
import asyncio
|
||||
import contextvars
|
||||
from functools import partial
|
||||
from typing import Any, AsyncIterator, Coroutine, Dict, List, Optional, Union, cast
|
||||
from typing import Any, AsyncIterator, Coroutine, Dict, Iterator, List, Optional, Union, cast
|
||||
|
||||
import litellm
|
||||
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
|
||||
|
|
@ -346,6 +346,7 @@ def anthropic_messages_handler(
|
|||
**kwargs,
|
||||
) -> Union[
|
||||
AnthropicMessagesResponse,
|
||||
Iterator[bytes],
|
||||
AsyncIterator[Any],
|
||||
Coroutine[Any, Any, Union[AnthropicMessagesResponse, AsyncIterator[Any]]],
|
||||
]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue