test_convert_to_v1_from_bedrock_converse() — langchain Function Reference
Architecture documentation for the test_convert_to_v1_from_bedrock_converse() function in test_bedrock_converse.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4420fdaf_c4ca_206e_8219_70746b175d5a["test_convert_to_v1_from_bedrock_converse()"] 62955156_befa_ca40_1d5e_7a58ff023ab3["test_bedrock_converse.py"] 4420fdaf_c4ca_206e_8219_70746b175d5a -->|defined in| 62955156_befa_ca40_1d5e_7a58ff023ab3 style 4420fdaf_c4ca_206e_8219_70746b175d5a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/block_translators/test_bedrock_converse.py lines 5–125
def test_convert_to_v1_from_bedrock_converse() -> None:
message = AIMessage(
[
{
"type": "reasoning_content",
"reasoning_content": {"text": "foo", "signature": "foo_signature"},
},
{"type": "text", "text": "Let's call a tool."},
{
"type": "tool_use",
"id": "abc_123",
"name": "get_weather",
"input": {"location": "San Francisco"},
},
{
"type": "text",
"text": "It's sunny.",
"citations": [
{
"title": "Document Title",
"source_content": [{"text": "The weather is sunny."}],
"location": {
"document_char": {
"document_index": 0,
"start": 58,
"end": 96,
}
},
},
{
"title": "Document Title",
"source_content": [{"text": "The weather is sunny."}],
"location": {
"document_page": {"document_index": 0, "start": 1, "end": 2}
},
},
{
"title": "Document Title",
"source_content": [{"text": "The weather is sunny."}],
"location": {
"document_chunk": {
"document_index": 0,
"start": 1,
"end": 2,
}
},
},
{"bar": "baz"},
],
},
{"type": "something_else", "foo": "bar"},
],
response_metadata={"model_provider": "bedrock_converse"},
)
expected_content: list[types.ContentBlock] = [
{
"type": "reasoning",
"reasoning": "foo",
"extras": {"signature": "foo_signature"},
},
{"type": "text", "text": "Let's call a tool."},
{
"type": "tool_call",
"id": "abc_123",
"name": "get_weather",
"args": {"location": "San Francisco"},
},
{
"type": "text",
"text": "It's sunny.",
"annotations": [
{
"type": "citation",
"title": "Document Title",
"cited_text": "The weather is sunny.",
"extras": {
"location": {
"document_char": {
"document_index": 0,
"start": 58,
"end": 96,
Domain
Subdomains
Source
Frequently Asked Questions
What does test_convert_to_v1_from_bedrock_converse() do?
test_convert_to_v1_from_bedrock_converse() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/block_translators/test_bedrock_converse.py.
Where is test_convert_to_v1_from_bedrock_converse() defined?
test_convert_to_v1_from_bedrock_converse() is defined in libs/core/tests/unit_tests/messages/block_translators/test_bedrock_converse.py at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free