core[patch]: Fixed bedrock chat model load. (#26643)

Fixes `load` for `ChatBedrock`, in-turn fixes unit test errors for
`standard-tests` in `langchain-aws`, when working with v0.2 branch.

```
FAILED tests/unit_tests/test_standard.py::TestBedrockStandard::test_serdes - ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'cha...
FAILED tests/unit_tests/test_standard.py::TestBedrockAsConverseStandard::test_serdes - ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'cha...
```
This commit is contained in:
Piyush Jain
2024-09-19 15:00:45 -07:00
committed by GitHub
parent 70c992bd61
commit c5eca37262
4 changed files with 333 additions and 374 deletions

View File

@@ -65,7 +65,7 @@ def test_example_id_assignment_threadsafe() -> None:
def test_tracer_with_run_tree_parent() -> None:
mock_session = unittest.mock.MagicMock()
client = Client(session=mock_session, api_key="test")
parent = RunTree(name="parent", inputs={"input": "foo"}, client=client)
parent = RunTree(name="parent", inputs={"input": "foo"}, _client=client)
run_id = uuid.uuid4()
tracer = LangChainTracer(client=client)
tracer.order_map[parent.id] = (parent.trace_id, parent.dotted_order)