test_convert_to_v1_from_bedrock_input() — langchain Function Reference
Architecture documentation for the test_convert_to_v1_from_bedrock_input() function in test_bedrock.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0a067df1_77bb_bbb1_24a1_b0503c60ec8d["test_convert_to_v1_from_bedrock_input()"] def88697_e248_838a_32cb_8e4be93e1e37["test_bedrock.py"] 0a067df1_77bb_bbb1_24a1_b0503c60ec8d -->|defined in| def88697_e248_838a_32cb_8e4be93e1e37 style 0a067df1_77bb_bbb1_24a1_b0503c60ec8d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/block_translators/test_bedrock.py lines 289–405
def test_convert_to_v1_from_bedrock_input() -> None:
message = HumanMessage(
[
{"type": "text", "text": "foo"},
{
"type": "document",
"source": {
"type": "base64",
"data": "<base64 data>",
"media_type": "application/pdf",
},
},
{
"type": "document",
"source": {
"type": "url",
"url": "<document url>",
},
},
{
"type": "document",
"source": {
"type": "content",
"content": [
{"type": "text", "text": "The grass is green"},
{"type": "text", "text": "The sky is blue"},
],
},
"citations": {"enabled": True},
},
{
"type": "document",
"source": {
"type": "text",
"data": "<plain text data>",
"media_type": "text/plain",
},
},
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": "<base64 image data>",
},
},
{
"type": "image",
"source": {
"type": "url",
"url": "<image url>",
},
},
{
"type": "image",
"source": {
"type": "file",
"file_id": "<image file id>",
},
},
{
"type": "document",
"source": {"type": "file", "file_id": "<pdf file id>"},
},
]
)
expected: list[types.ContentBlock] = [
{"type": "text", "text": "foo"},
{
"type": "file",
"base64": "<base64 data>",
"mime_type": "application/pdf",
},
{
"type": "file",
"url": "<document url>",
},
{
"type": "non_standard",
"value": {
Domain
Subdomains
Source
Frequently Asked Questions
What does test_convert_to_v1_from_bedrock_input() do?
test_convert_to_v1_from_bedrock_input() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/block_translators/test_bedrock.py.
Where is test_convert_to_v1_from_bedrock_input() defined?
test_convert_to_v1_from_bedrock_input() is defined in libs/core/tests/unit_tests/messages/block_translators/test_bedrock.py at line 289.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free