Home / File/ test_standard.py — langchain Source File

test_standard.py — langchain Source File

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

File python CoreAbstractions RunnableInterface 3 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  fb550611_2aa6_768c_ff6c_726ced251f2d["test_standard.py"]
  ba43b74d_3099_7e1c_aac3_cf594720469e["langchain_core.language_models"]
  fb550611_2aa6_768c_ff6c_726ced251f2d --> ba43b74d_3099_7e1c_aac3_cf594720469e
  bab3058f_1ec6_5a8a_2b11_86f46e62adb4["langchain_tests.unit_tests"]
  fb550611_2aa6_768c_ff6c_726ced251f2d --> bab3058f_1ec6_5a8a_2b11_86f46e62adb4
  9d19aeb9_35aa_ec9e_adca_9ac1aea84236["langchain_fireworks"]
  fb550611_2aa6_768c_ff6c_726ced251f2d --> 9d19aeb9_35aa_ec9e_adca_9ac1aea84236
  style fb550611_2aa6_768c_ff6c_726ced251f2d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Standard LangChain interface tests."""

from langchain_core.language_models import BaseChatModel
from langchain_tests.unit_tests import (  # type: ignore[import-not-found]
    ChatModelUnitTests,  # type: ignore[import-not-found]
)

from langchain_fireworks import ChatFireworks


class TestFireworksStandard(ChatModelUnitTests):
    @property
    def chat_model_class(self) -> type[BaseChatModel]:
        return ChatFireworks

    @property
    def chat_model_params(self) -> dict:
        return {
            "model": "accounts/fireworks/models/llama-v3p1-70b-instruct",
            "api_key": "test_api_key",
        }

    @property
    def init_from_env_params(self) -> tuple[dict, dict, dict]:
        return (
            {
                "FIREWORKS_API_KEY": "api_key",
                "FIREWORKS_API_BASE": "https://base.com",
            },
            {
                "model": "accounts/fireworks/models/llama-v3p1-70b-instruct",
            },
            {
                "fireworks_api_key": "api_key",
                "fireworks_api_base": "https://base.com",
            },
        )


def test_profile() -> None:
    """Test that model profile is loaded correctly."""
    model = ChatFireworks(
        model="accounts/fireworks/models/gpt-oss-20b",
        api_key="test_key",  # type: ignore[arg-type]
    )
    assert model.profile

Subdomains

Functions

Dependencies

  • langchain_core.language_models
  • langchain_fireworks
  • langchain_tests.unit_tests

Frequently Asked Questions

What does test_standard.py do?
test_standard.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What functions are defined in test_standard.py?
test_standard.py defines 1 function(s): test_profile.
What does test_standard.py depend on?
test_standard.py imports 3 module(s): langchain_core.language_models, langchain_fireworks, langchain_tests.unit_tests.
Where is test_standard.py in the architecture?
test_standard.py is located at libs/partners/fireworks/tests/unit_tests/test_standard.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/partners/fireworks/tests/unit_tests).

Analyze Your Own Codebase

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

Try Supermodel Free