Home / Function/ mustache_formatter() — langchain Function Reference

mustache_formatter() — langchain Function Reference

Architecture documentation for the mustache_formatter() function in string.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3d01fff0_54ef_4177_3e96_a42e8258bb58["mustache_formatter()"]
  a7a9f16f_a913_8e85_a792_d083dd92c428["string.py"]
  3d01fff0_54ef_4177_3e96_a42e8258bb58 -->|defined in| a7a9f16f_a913_8e85_a792_d083dd92c428
  3d01fff0_54ef_4177_3e96_a42e8258bb58["mustache_formatter()"]
  3d01fff0_54ef_4177_3e96_a42e8258bb58 -->|calls| 3d01fff0_54ef_4177_3e96_a42e8258bb58
  3d01fff0_54ef_4177_3e96_a42e8258bb58["mustache_formatter()"]
  3d01fff0_54ef_4177_3e96_a42e8258bb58 -->|calls| 3d01fff0_54ef_4177_3e96_a42e8258bb58
  style 3d01fff0_54ef_4177_3e96_a42e8258bb58 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/prompts/string.py lines 110–120

def mustache_formatter(template: str, /, **kwargs: Any) -> str:
    """Format a template using mustache.

    Args:
        template: The template string.
        **kwargs: The variables to format the template with.

    Returns:
        The formatted string.
    """
    return mustache.render(template, kwargs)

Subdomains

Frequently Asked Questions

What does mustache_formatter() do?
mustache_formatter() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/string.py.
Where is mustache_formatter() defined?
mustache_formatter() is defined in libs/core/langchain_core/prompts/string.py at line 110.
What does mustache_formatter() call?
mustache_formatter() calls 1 function(s): mustache_formatter.
What calls mustache_formatter()?
mustache_formatter() is called by 1 function(s): mustache_formatter.

Analyze Your Own Codebase

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

Try Supermodel Free