Home / Function/ from_default() — langchain Function Reference

from_default() — langchain Function Reference

Architecture documentation for the from_default() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f5dc12b9_763d_923e_5f22_bd38cf4d8fa7["from_default()"]
  9171cff6_74d4_b785_eb4e_31a83af8c002["NatBotChain"]
  f5dc12b9_763d_923e_5f22_bd38cf4d8fa7 -->|defined in| 9171cff6_74d4_b785_eb4e_31a83af8c002
  c16575c9_7d3c_386e_2f1e_286d9846f11f["from_llm()"]
  f5dc12b9_763d_923e_5f22_bd38cf4d8fa7 -->|calls| c16575c9_7d3c_386e_2f1e_286d9846f11f
  style f5dc12b9_763d_923e_5f22_bd38cf4d8fa7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/natbot/base.py lines 83–90

    def from_default(cls, objective: str, **kwargs: Any) -> NatBotChain:
        """Load with default LLMChain."""
        msg = (
            "This method is no longer implemented. Please use from_llm."
            "model = OpenAI(temperature=0.5, best_of=10, n=3, max_tokens=50)"
            "For example, NatBotChain.from_llm(model, objective)"
        )
        raise NotImplementedError(msg)

Subdomains

Calls

Frequently Asked Questions

What does from_default() do?
from_default() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/natbot/base.py.
Where is from_default() defined?
from_default() is defined in libs/langchain/langchain_classic/chains/natbot/base.py at line 83.
What does from_default() call?
from_default() calls 1 function(s): from_llm.

Analyze Your Own Codebase

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

Try Supermodel Free