Skip to content

Commit

Permalink
Merge branch 'v0.3rc' into cc/mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme committed Sep 4, 2024
2 parents 4463364 + 6e85350 commit 6b94504
Show file tree
Hide file tree
Showing 188 changed files with 12,924 additions and 5,708 deletions.
3 changes: 3 additions & 0 deletions libs/cli/langchain_cli/integration_template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ integration_test integration_tests: TEST_FILE = tests/integration_tests/
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

test_watch:
poetry run ptw --snapshot-update --now . -- -vv $(TEST_FILE)

# integration tests are run without the --disable-socket flag to allow network calls
integration_test integration_tests:
poetry run pytest $(TEST_FILE)
Expand Down
1 change: 1 addition & 0 deletions libs/cli/langchain_cli/integration_template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pytest = "^7.4.3"
pytest-asyncio = "^0.23.2"
pytest-socket = "^0.7.0"
langchain-core = { path = "../../core", develop = true }
pytest-watcher = "^0.3.4"

[tool.poetry.group.codespell]
optional = true
Expand Down
10 changes: 10 additions & 0 deletions libs/community/tests/unit_tests/load/test_serializable.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ def test_serializable_mapping() -> None:
"modifier",
"RemoveMessage",
),
("langchain", "chat_models", "mistralai", "ChatMistralAI"): (
"langchain_mistralai",
"chat_models",
"ChatMistralAI",
),
("langchain_groq", "chat_models", "ChatGroq"): (
"langchain_groq",
"chat_models",
"ChatGroq",
),
}
serializable_modules = import_all_modules("langchain")

Expand Down
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 @@ -17,6 +17,7 @@
"langchain_core",
"langchain_community",
"langchain_anthropic",
"langchain_groq",
]

ALL_SERIALIZABLE_MAPPINGS = {
Expand Down
10 changes: 10 additions & 0 deletions libs/core/langchain_core/load/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@
"chat_models",
"ChatAnthropic",
),
("langchain_groq", "chat_models", "ChatGroq"): (
"langchain_groq",
"chat_models",
"ChatGroq",
),
("langchain", "chat_models", "fireworks", "ChatFireworks"): (
"langchain_fireworks",
"chat_models",
Expand All @@ -287,6 +292,11 @@
"chat_models",
"ChatVertexAI",
),
("langchain", "chat_models", "mistralai", "ChatMistralAI"): (
"langchain_mistralai",
"chat_models",
"ChatMistralAI",
),
("langchain", "schema", "output", "ChatGenerationChunk"): (
"langchain_core",
"outputs",
Expand Down
6 changes: 6 additions & 0 deletions libs/core/langchain_core/messages/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
SystemMessage,
FunctionMessage,
ToolMessage,
AIMessageChunk,
HumanMessageChunk,
ChatMessageChunk,
SystemMessageChunk,
FunctionMessageChunk,
ToolMessageChunk,
]


Expand Down
Loading

0 comments on commit 6b94504

Please sign in to comment.