fix(core): serialization patch (#34455)

- `allowed_objects` kwarg in `load`
- escape lc-ser formatted dicts on `dump`
- fix for jinja2

---------

Co-authored-by: Mason Daugherty <github@mdrxy.com>
This commit is contained in:
ccurme
2025-12-22 18:33:31 -05:00
committed by GitHub
parent 6a416c6186
commit 5ec0fa69de
25 changed files with 1769 additions and 116 deletions

View File

@@ -7,6 +7,8 @@ from pytest_benchmark.fixture import BenchmarkFixture # type: ignore[import-unt
from langchain_anthropic import ChatAnthropic
_MODEL = "claude-3-haiku-20240307"
class TestAnthropicStandard(ChatModelUnitTests):
"""Use the standard chat model unit tests against the `ChatAnthropic` class."""
@@ -17,7 +19,15 @@ class TestAnthropicStandard(ChatModelUnitTests):
@property
def chat_model_params(self) -> dict:
return {"model": "claude-3-haiku-20240307"}
return {"model": _MODEL}
@property
def init_from_env_params(self) -> tuple[dict, dict, dict]:
return (
{"ANTHROPIC_API_KEY": "test"},
{"model": _MODEL},
{"anthropic_api_key": "test"},
)
@pytest.mark.benchmark