Skip to content

Commit

Permalink
core[patch]: Fixed bedrock chat model load. (#26643)
Browse files Browse the repository at this point in the history
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...
```
  • Loading branch information
3coins committed Sep 19, 2024
1 parent 70c992b commit c5eca37
Show file tree
Hide file tree
Showing 4 changed files with 333 additions and 374 deletions.
1 change: 1 addition & 0 deletions libs/core/langchain_core/load/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"langchain_community",
"langchain_anthropic",
"langchain_groq",
"langchain_aws",
]

ALL_SERIALIZABLE_MAPPINGS = {
Expand Down
5 changes: 5 additions & 0 deletions libs/core/langchain_core/load/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,4 +1017,9 @@
"image",
"ImagePromptTemplate",
),
("langchain", "chat_models", "bedrock", "ChatBedrock"): (
"langchain_aws",
"chat_models",
"ChatBedrock",
),
}
Loading

0 comments on commit c5eca37

Please sign in to comment.