Home / Function/ test_fireworks_api_key_is_secret_string() — langchain Function Reference

test_fireworks_api_key_is_secret_string() — langchain Function Reference

Architecture documentation for the test_fireworks_api_key_is_secret_string() function in test_llms.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e9ee1b89_4352_8ec5_aa40_56a58a80510d["test_fireworks_api_key_is_secret_string()"]
  9a53709e_8202_5be7_e42c_f8989b683717["test_llms.py"]
  e9ee1b89_4352_8ec5_aa40_56a58a80510d -->|defined in| 9a53709e_8202_5be7_e42c_f8989b683717
  style e9ee1b89_4352_8ec5_aa40_56a58a80510d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/fireworks/tests/unit_tests/test_llms.py lines 11–28

def test_fireworks_api_key_is_secret_string() -> None:
    """Test that the API key is stored as a SecretStr."""
    llm = Fireworks(  # type: ignore[call-arg]
        fireworks_api_key="secret-api-key",
        model="accounts/fireworks/models/mixtral-8x7b-instruct",
        temperature=0.2,
        max_tokens=250,
    )
    assert isinstance(llm.fireworks_api_key, SecretStr)

    # Test api_key alias
    llm = Fireworks(
        api_key="secret-api-key",  # type: ignore[arg-type]
        model="accounts/fireworks/models/mixtral-8x7b-instruct",
        temperature=0.2,
        max_tokens=250,
    )
    assert isinstance(llm.fireworks_api_key, SecretStr)

Domain

Subdomains

Frequently Asked Questions

What does test_fireworks_api_key_is_secret_string() do?
test_fireworks_api_key_is_secret_string() is a function in the langchain codebase, defined in libs/partners/fireworks/tests/unit_tests/test_llms.py.
Where is test_fireworks_api_key_is_secret_string() defined?
test_fireworks_api_key_is_secret_string() is defined in libs/partners/fireworks/tests/unit_tests/test_llms.py at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free