Home / File/ test_llms.py — langchain Source File

test_llms.py — langchain Source File

Architecture documentation for test_llms.py, a python file in the langchain codebase. 2 imports, 0 dependents.

File python LangChainCore LanguageModelBase 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  a04a3899_3148_06be_27cb_f513a509c515["test_llms.py"]
  0029f612_c503_ebcf_a452_a0fae8c9f2c3["os"]
  a04a3899_3148_06be_27cb_f513a509c515 --> 0029f612_c503_ebcf_a452_a0fae8c9f2c3
  a270c900_ac1e_6518_f720_875b8b52a3a0["langchain_anthropic"]
  a04a3899_3148_06be_27cb_f513a509c515 --> a270c900_ac1e_6518_f720_875b8b52a3a0
  style a04a3899_3148_06be_27cb_f513a509c515 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import os

from langchain_anthropic import AnthropicLLM

os.environ["ANTHROPIC_API_KEY"] = "foo"


def test_anthropic_model_params() -> None:
    # Test standard tracing params
    llm = AnthropicLLM(model="foo")  # type: ignore[call-arg]

    ls_params = llm._get_ls_params()
    assert ls_params == {
        "ls_provider": "anthropic",
        "ls_model_type": "llm",
        "ls_model_name": "foo",
        "ls_max_tokens": 1024,
    }

    llm = AnthropicLLM(model="foo", temperature=0.1)  # type: ignore[call-arg]

    ls_params = llm._get_ls_params()
    assert ls_params == {
        "ls_provider": "anthropic",
        "ls_model_type": "llm",
        "ls_model_name": "foo",
        "ls_max_tokens": 1024,
        "ls_temperature": 0.1,
    }

Domain

Subdomains

Dependencies

  • langchain_anthropic
  • os

Frequently Asked Questions

What does test_llms.py do?
test_llms.py is a source file in the langchain codebase, written in python. It belongs to the LangChainCore domain, LanguageModelBase subdomain.
What functions are defined in test_llms.py?
test_llms.py defines 1 function(s): test_anthropic_model_params.
What does test_llms.py depend on?
test_llms.py imports 2 module(s): langchain_anthropic, os.
Where is test_llms.py in the architecture?
test_llms.py is located at libs/partners/anthropic/tests/unit_tests/test_llms.py (domain: LangChainCore, subdomain: LanguageModelBase, directory: libs/partners/anthropic/tests/unit_tests).

Analyze Your Own Codebase

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

Try Supermodel Free