1
0
mirror of https://github.com/hwchase17/langchain.git synced 2025-05-03 14:18:03 +00:00

core: add sambanova chat models to load module mapping ()

- **Description:** add sambanova integration package chat models to load
module mapping, to allow serialization and deserialization
This commit is contained in:
Jorge Piedrahita Ortiz 2025-02-20 12:30:50 -05:00 committed by GitHub
parent d227e4a08e
commit 3acf842e35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions
libs
community/tests/unit_tests/load
core/langchain_core/load

View File

@ -112,6 +112,16 @@ def test_serializable_mapping() -> None:
"chat_models",
"ChatGroq",
),
("langchain_sambanova", "chat_models", "ChatSambaNovaCloud"): (
"langchain_sambanova",
"chat_models",
"ChatSambaNovaCloud",
),
("langchain_sambanova", "chat_models", "ChatSambaStudio"): (
"langchain_sambanova",
"chat_models",
"ChatSambaStudio",
),
# TODO(0.3): For now we're skipping the below two tests. Need to fix
# so that it only runs when langchain-aws, langchain-google-genai
# are installed.

View File

@ -25,6 +25,7 @@ DEFAULT_NAMESPACES = [
"langchain_mistralai",
"langchain_fireworks",
"langchain_xai",
"langchain_sambanova",
]
# Namespaces for which only deserializing via the SERIALIZABLE_MAPPING is allowed.
# Load by path is not allowed.

View File

@ -528,6 +528,16 @@ SERIALIZABLE_MAPPING: dict[tuple[str, ...], tuple[str, ...]] = {
"structured",
"StructuredPrompt",
),
("langchain_sambanova", "chat_models", "ChatSambaNovaCloud"): (
"langchain_sambanova",
"chat_models",
"ChatSambaNovaCloud",
),
("langchain_sambanova", "chat_models", "ChatSambaStudio"): (
"langchain_sambanova",
"chat_models",
"ChatSambaStudio",
),
}
# Needed for backwards compatibility for old versions of LangChain where things