mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
fix: address review feedback on Any reduction
- drop redundant Protocol docstrings in dynamodb and otel mount - widen hosted_vllm custom-tool conversion signature from Any to object
This commit is contained in:
parent
6df5eef768
commit
e46c816ec7
3 changed files with 2 additions and 8 deletions
|
|
@ -11,14 +11,10 @@ from litellm._uuid import uuid
|
|||
|
||||
|
||||
class _DynamoTable(Protocol):
|
||||
"""The one boto3 DynamoDB table call this logger makes."""
|
||||
|
||||
def put_item(self, *, Item: Mapping[str, object]) -> object: ...
|
||||
|
||||
|
||||
class _DynamoResource(Protocol):
|
||||
"""The one boto3 DynamoDB resource call this logger makes."""
|
||||
|
||||
def Table(self, name: str) -> _DynamoTable: ...
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ PASSTHROUGH_PREFIXES: Final = frozenset(
|
|||
|
||||
|
||||
class _RenameableSpan(Protocol):
|
||||
"""The span surface the passthrough naming hook drives."""
|
||||
|
||||
def is_recording(self) -> bool: ...
|
||||
|
||||
def update_name(self, name: str) -> None: ...
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Translate from OpenAI's `/v1/chat/completions` to VLLM's `/v1/chat/completions`
|
|||
|
||||
import json
|
||||
from collections.abc import Coroutine
|
||||
from typing import Any, Final, Literal, cast, overload
|
||||
from typing import Final, Literal, cast, overload
|
||||
|
||||
from litellm.litellm_core_utils.prompt_templates.common_utils import (
|
||||
_get_image_mime_type_from_url,
|
||||
|
|
@ -28,7 +28,7 @@ from ...openai.chat.gpt_transformation import OpenAIGPTConfig
|
|||
|
||||
|
||||
class HostedVLLMChatConfig(OpenAIGPTConfig):
|
||||
def _convert_custom_tools_to_function_tools(self, tools: list[dict[str, Any]]) -> list[dict[str, object]]:
|
||||
def _convert_custom_tools_to_function_tools(self, tools: list[dict[str, object]]) -> list[dict[str, object]]:
|
||||
"""
|
||||
vLLM chat completions currently accepts only OpenAI function tools.
|
||||
Convert custom tools into function tools so request validation does not fail.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue