Home / Function/ test_auto_infer_input_variables() — langchain Function Reference

test_auto_infer_input_variables() — langchain Function Reference

Architecture documentation for the test_auto_infer_input_variables() function in test_few_shot.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  630f7d3c_ee0a_0a80_5208_108f17c3b3df["test_auto_infer_input_variables()"]
  e4e12a36_798e_ddc0_ab57_e44de269c7e7["test_few_shot.py"]
  630f7d3c_ee0a_0a80_5208_108f17c3b3df -->|defined in| e4e12a36_798e_ddc0_ab57_e44de269c7e7
  style 630f7d3c_ee0a_0a80_5208_108f17c3b3df fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_few_shot.py lines 63–71

def test_auto_infer_input_variables() -> None:
    """Test prompt works with just a suffix."""
    suffix = "This is a {foo} test."
    prompt = FewShotPromptTemplate(
        suffix=suffix,
        examples=[],
        example_prompt=EXAMPLE_PROMPT,
    )
    assert prompt.input_variables == ["foo"]

Domain

Subdomains

Frequently Asked Questions

What does test_auto_infer_input_variables() do?
test_auto_infer_input_variables() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_few_shot.py.
Where is test_auto_infer_input_variables() defined?
test_auto_infer_input_variables() is defined in libs/core/tests/unit_tests/prompts/test_few_shot.py at line 63.

Analyze Your Own Codebase

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

Try Supermodel Free