mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix typo of orginal (#16255)
This commit is contained in:
parent
b4def8899f
commit
4e12e3f90d
5 changed files with 12 additions and 12 deletions
|
|
@ -1490,7 +1490,7 @@ def convert_to_anthropic_tool_invoke(
|
|||
|
||||
_content_element = add_cache_control_to_content(
|
||||
anthropic_content_element=_anthropic_tool_use_param,
|
||||
orignal_content_element=dict(tool),
|
||||
original_content_element=dict(tool),
|
||||
)
|
||||
|
||||
if "cache_control" in _content_element:
|
||||
|
|
@ -1512,9 +1512,9 @@ def add_cache_control_to_content(
|
|||
AnthropicMessagesToolUseParam,
|
||||
ChatCompletionThinkingBlock,
|
||||
],
|
||||
orignal_content_element: Union[dict, AllMessageValues],
|
||||
original_content_element: Union[dict, AllMessageValues],
|
||||
):
|
||||
cache_control_param = orignal_content_element.get("cache_control")
|
||||
cache_control_param = original_content_element.get("cache_control")
|
||||
if cache_control_param is not None and isinstance(cache_control_param, dict):
|
||||
transformed_param = ChatCompletionCachedContent(**cache_control_param) # type: ignore
|
||||
|
||||
|
|
@ -1727,7 +1727,7 @@ def anthropic_messages_pt( # noqa: PLR0915
|
|||
)
|
||||
_content_element = add_cache_control_to_content(
|
||||
anthropic_content_element=_anthropic_content_element,
|
||||
orignal_content_element=dict(m),
|
||||
original_content_element=dict(m),
|
||||
)
|
||||
|
||||
if "cache_control" in _content_element:
|
||||
|
|
@ -1745,7 +1745,7 @@ def anthropic_messages_pt( # noqa: PLR0915
|
|||
)
|
||||
_content_element = add_cache_control_to_content(
|
||||
anthropic_content_element=_anthropic_text_content_element,
|
||||
orignal_content_element=dict(m),
|
||||
original_content_element=dict(m),
|
||||
)
|
||||
_content_element = cast(
|
||||
AnthropicMessagesTextParam, _content_element
|
||||
|
|
@ -1767,7 +1767,7 @@ def anthropic_messages_pt( # noqa: PLR0915
|
|||
}
|
||||
_content_element = add_cache_control_to_content(
|
||||
anthropic_content_element=_anthropic_content_text_element,
|
||||
orignal_content_element=dict(user_message_types_block),
|
||||
original_content_element=dict(user_message_types_block),
|
||||
)
|
||||
|
||||
if "cache_control" in _content_element:
|
||||
|
|
@ -1825,7 +1825,7 @@ def anthropic_messages_pt( # noqa: PLR0915
|
|||
)
|
||||
_cached_message = add_cache_control_to_content(
|
||||
anthropic_content_element=anthropic_message,
|
||||
orignal_content_element=dict(m),
|
||||
original_content_element=dict(m),
|
||||
)
|
||||
|
||||
assistant_content.append(
|
||||
|
|
@ -1845,7 +1845,7 @@ def anthropic_messages_pt( # noqa: PLR0915
|
|||
|
||||
_content_element = add_cache_control_to_content(
|
||||
anthropic_content_element=_anthropic_text_content_element,
|
||||
orignal_content_element=dict(assistant_content_block),
|
||||
original_content_element=dict(assistant_content_block),
|
||||
)
|
||||
|
||||
if "cache_control" in _content_element:
|
||||
|
|
|
|||
|
|
@ -1305,7 +1305,7 @@ class CustomStreamWrapper:
|
|||
else: # openai / azure chat model
|
||||
if self.custom_llm_provider == "azure":
|
||||
if isinstance(chunk, BaseModel) and hasattr(chunk, "model"):
|
||||
# for azure, we need to pass the model from the orignal chunk
|
||||
# for azure, we need to pass the model from the original chunk
|
||||
self.model = getattr(chunk, "model", self.model)
|
||||
response_obj = self.handle_openai_chat_completion_chunk(chunk)
|
||||
if response_obj is None:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class UserAPIKeyAuthExceptionHandler:
|
|||
- UserAPIKeyAuth: If general_settings.allow_requests_on_db_unavailable is True
|
||||
|
||||
Raises:
|
||||
- Orignal Exception in all other cases
|
||||
- Original Exception in all other cases
|
||||
"""
|
||||
from litellm.proxy.proxy_server import (
|
||||
general_settings,
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ async def _add_model_to_db(
|
|||
) -> Optional[LiteLLM_ProxyModelTable]:
|
||||
# encrypt litellm params #
|
||||
_litellm_params_dict = model_params.litellm_params.dict(exclude_none=True)
|
||||
_orignal_litellm_model_name = model_params.litellm_params.model
|
||||
_original_litellm_model_name = model_params.litellm_params.model
|
||||
for k, v in _litellm_params_dict.items():
|
||||
encrypted_value = encrypt_value_helper(
|
||||
value=v, new_encryption_key=new_encryption_key
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ async def test_vertex_ai_gemini_token_counting_with_contents(model_name):
|
|||
|
||||
print("Vertex AI Gemini token counting response:", response)
|
||||
|
||||
# validate we have orignal response
|
||||
# validate we have original response
|
||||
assert response.original_response is not None
|
||||
assert response.original_response.get("totalTokens") is not None
|
||||
assert response.original_response.get("promptTokensDetails") is not None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue