Home / Function/ test_create_prompt_output() — langchain Function Reference

test_create_prompt_output() — langchain Function Reference

Architecture documentation for the test_create_prompt_output() function in test_structured_chat.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  4e6a5d3d_ded1_b73a_b7f1_0d3c7cead611["test_create_prompt_output()"]
  742971a1_c426_ee5f_9355_f94bbb636166["TestCreatePrompt"]
  4e6a5d3d_ded1_b73a_b7f1_0d3c7cead611 -->|defined in| 742971a1_c426_ee5f_9355_f94bbb636166
  style 4e6a5d3d_ded1_b73a_b7f1_0d3c7cead611 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/test_structured_chat.py lines 124–132

    def test_create_prompt_output(self) -> None:
        prompt = StructuredChatAgent.create_prompt(
            [Tool(name="foo", description="Test tool FOO", func=lambda x: x)],
        )

        assert isinstance(prompt, ChatPromptTemplate)
        assert len(prompt.messages) == 2
        assert isinstance(prompt.messages[0], SystemMessagePromptTemplate)
        assert isinstance(prompt.messages[1], HumanMessagePromptTemplate)

Domain

Subdomains

Frequently Asked Questions

What does test_create_prompt_output() do?
test_create_prompt_output() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_structured_chat.py.
Where is test_create_prompt_output() defined?
test_create_prompt_output() is defined in libs/langchain/tests/unit_tests/agents/test_structured_chat.py at line 124.

Analyze Your Own Codebase

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

Try Supermodel Free