mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test: fix Bedrock PDF tool-result bytes assertion in factory test
The test supplies a minimal PDF base64 payload but expected the wrong constant (base64 for "test"). Assert against the same pdf_b64 value and drop the unused import. Made-with: Cursor
This commit is contained in:
parent
94162916a8
commit
900ef454c8
1 changed files with 1 additions and 5 deletions
|
|
@ -2487,10 +2487,6 @@ def test_convert_to_anthropic_tool_result_openai_file_pdf_becomes_document():
|
|||
inside the tool_result content. Reuses anthropic_process_openai_file_message,
|
||||
which already handles this for user messages.
|
||||
"""
|
||||
from litellm.litellm_core_utils.prompt_templates.factory import (
|
||||
convert_to_anthropic_tool_result,
|
||||
)
|
||||
|
||||
pdf_b64 = "JVBERi0xLjQKJeLjz9MK"
|
||||
message = {
|
||||
"tool_call_id": "toolu_pdf_1",
|
||||
|
|
@ -2513,7 +2509,7 @@ def test_convert_to_anthropic_tool_result_openai_file_pdf_becomes_document():
|
|||
assert len(tool_result["content"]) == 1
|
||||
assert "document" in tool_result["content"][0]
|
||||
assert tool_result["content"][0]["document"]["format"] == "pdf"
|
||||
assert tool_result["content"][0]["document"]["source"]["bytes"] == "dGVzdA=="
|
||||
assert tool_result["content"][0]["document"]["source"]["bytes"] == pdf_b64
|
||||
|
||||
|
||||
def test_bedrock_converse_messages_pt_document_various_formats():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue