mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
docs: reference the source union by type instead of a line number
The line number went stale when the base moved.
This commit is contained in:
parent
0e7562dbc6
commit
bb51c121cf
2 changed files with 2 additions and 2 deletions
|
|
@ -861,7 +861,7 @@ class AnthropicMessagesHandler(BaseTranslation):
|
|||
def _image_sources(block: Mapping[str, object]) -> tuple[str, ...]:
|
||||
"""Normalize an Anthropic image block into strings a guardrail can read.
|
||||
|
||||
`source` is one of three shapes (types/llms/anthropic.py:259):
|
||||
`source` is one of three shapes (`AnthropicMessagesImageParam.source`):
|
||||
|
||||
{"type": "base64", "media_type": "image/png", "data": "<b64>"}
|
||||
{"type": "url", "url": "https://..."}
|
||||
|
|
|
|||
|
|
@ -1491,7 +1491,7 @@ class MockCanaryMaskingGuardrail(CustomGuardrail):
|
|||
|
||||
|
||||
class TestAnthropicMessagesImageSources:
|
||||
"""An Anthropic image block has three source shapes (types/llms/anthropic.py:259).
|
||||
"""An Anthropic image block has three source shapes (`AnthropicMessagesImageParam.source`).
|
||||
|
||||
Only the base64 one carries "data", so reading that key alone drops url images
|
||||
entirely -- for every guardrail consuming GenericGuardrailAPIInputs["images"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue