DummyLLM Class — langchain Architecture
Architecture documentation for the DummyLLM class in test_conversation.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f7baad7f_82a2_2b43_5806_277080f263f3["DummyLLM"] b2c7d2a5_0852_93df_c3e1_828c36a88999["LLM"] f7baad7f_82a2_2b43_5806_277080f263f3 -->|extends| b2c7d2a5_0852_93df_c3e1_828c36a88999 bad7138b_753c_8c4e_915e_8bf58ada3cec["test_conversation.py"] f7baad7f_82a2_2b43_5806_277080f263f3 -->|defined in| bad7138b_753c_8c4e_915e_8bf58ada3cec 93974e1e_8003_3f7c_7bca_8e7952d87cc0["__init__()"] f7baad7f_82a2_2b43_5806_277080f263f3 -->|method| 93974e1e_8003_3f7c_7bca_8e7952d87cc0 dfde6ef1_8400_4d58_432d_57c4f0c476c8["_llm_type()"] f7baad7f_82a2_2b43_5806_277080f263f3 -->|method| dfde6ef1_8400_4d58_432d_57c4f0c476c8 ba130edb_97d0_8bfa_3fda_400337040463["_call()"] f7baad7f_82a2_2b43_5806_277080f263f3 -->|method| ba130edb_97d0_8bfa_3fda_400337040463
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/chains/test_conversation.py lines 20–39
class DummyLLM(LLM):
last_prompt: str = ""
def __init__(self, **kwargs: Any):
super().__init__(**kwargs)
@property
def _llm_type(self) -> str:
return "dummy"
@override
def _call(
self,
prompt: str,
stop: list[str] | None = None,
run_manager: CallbackManagerForLLMRun | None = None,
**kwargs: Any,
) -> str:
self.last_prompt = prompt
return "dummy"
Extends
Source
Frequently Asked Questions
What is the DummyLLM class?
DummyLLM is a class in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_conversation.py.
Where is DummyLLM defined?
DummyLLM is defined in libs/langchain/tests/unit_tests/chains/test_conversation.py at line 20.
What does DummyLLM extend?
DummyLLM extends LLM.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free