Home / Function/ test_anthropic_fields_in_model_kwargs() — langchain Function Reference

test_anthropic_fields_in_model_kwargs() — langchain Function Reference

Architecture documentation for the test_anthropic_fields_in_model_kwargs() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b33b6061_0c03_1260_22b3_b83ddb06be2b["test_anthropic_fields_in_model_kwargs()"]
  18428dc5_a41b_90c6_88ad_615296ee3311["test_chat_models.py"]
  b33b6061_0c03_1260_22b3_b83ddb06be2b -->|defined in| 18428dc5_a41b_90c6_88ad_615296ee3311
  style b33b6061_0c03_1260_22b3_b83ddb06be2b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/test_chat_models.py lines 174–179

def test_anthropic_fields_in_model_kwargs() -> None:
    """Test that for backwards compatibility fields can be passed in as model_kwargs."""
    llm = ChatAnthropic(model=MODEL_NAME, model_kwargs={"max_tokens_to_sample": 5})  # type: ignore[call-arg]
    assert llm.max_tokens == 5
    llm = ChatAnthropic(model=MODEL_NAME, model_kwargs={"max_tokens": 5})  # type: ignore[call-arg]
    assert llm.max_tokens == 5

Domain

Subdomains

Frequently Asked Questions

What does test_anthropic_fields_in_model_kwargs() do?
test_anthropic_fields_in_model_kwargs() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py.
Where is test_anthropic_fields_in_model_kwargs() defined?
test_anthropic_fields_in_model_kwargs() is defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py at line 174.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free