format_prompt() — langchain Function Reference
Architecture documentation for the format_prompt() function in string.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 387c2349_0d2e_c313_bc73_fac3da07811e["format_prompt()"] a3097815_cadb_7ebc_b29a_72117ccf6e27["StringPromptTemplate"] 387c2349_0d2e_c313_bc73_fac3da07811e -->|defined in| a3097815_cadb_7ebc_b29a_72117ccf6e27 387c2349_0d2e_c313_bc73_fac3da07811e["format_prompt()"] 387c2349_0d2e_c313_bc73_fac3da07811e -->|calls| 387c2349_0d2e_c313_bc73_fac3da07811e f2111c77_3867_1c07_6d6d_01dfad0cc994["format()"] 387c2349_0d2e_c313_bc73_fac3da07811e -->|calls| f2111c77_3867_1c07_6d6d_01dfad0cc994 387c2349_0d2e_c313_bc73_fac3da07811e["format_prompt()"] 387c2349_0d2e_c313_bc73_fac3da07811e -->|calls| 387c2349_0d2e_c313_bc73_fac3da07811e style 387c2349_0d2e_c313_bc73_fac3da07811e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/prompts/string.py lines 321–330
def format_prompt(self, **kwargs: Any) -> PromptValue:
"""Format the prompt with the inputs.
Args:
**kwargs: Any arguments to be passed to the prompt template.
Returns:
A formatted string.
"""
return StringPromptValue(text=self.format(**kwargs))
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does format_prompt() do?
format_prompt() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/string.py.
Where is format_prompt() defined?
format_prompt() is defined in libs/core/langchain_core/prompts/string.py at line 321.
What does format_prompt() call?
format_prompt() calls 2 function(s): format, format_prompt.
What calls format_prompt()?
format_prompt() is called by 1 function(s): format_prompt.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free