Home / Function/ test_fireworks_api_key_masked_when_passed_from_env() — langchain Function Reference

test_fireworks_api_key_masked_when_passed_from_env() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/fireworks/tests/unit_tests/test_llms.py lines 31–44

def test_fireworks_api_key_masked_when_passed_from_env(
    monkeypatch: MonkeyPatch, capsys: CaptureFixture
) -> None:
    """Test that the API key is masked when passed from an environment variable."""
    monkeypatch.setenv("FIREWORKS_API_KEY", "secret-api-key")
    llm = Fireworks(
        model="accounts/fireworks/models/mixtral-8x7b-instruct",
        temperature=0.2,
        max_tokens=250,
    )
    print(llm.fireworks_api_key, end="")  # noqa: T201
    captured = capsys.readouterr()

    assert captured.out == "**********"

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free