aformat() — langchain Function Reference
Architecture documentation for the aformat() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0295e9e8_9e6c_edee_9cdd_3bb377028854["aformat()"] dddce6a3_2420_c71d_01fe_f214c3eb2503["BasePromptTemplate"] 0295e9e8_9e6c_edee_9cdd_3bb377028854 -->|defined in| dddce6a3_2420_c71d_01fe_f214c3eb2503 fb21269c_c5f5_be1c_b818_f16b08aab496["aformat_document()"] fb21269c_c5f5_be1c_b818_f16b08aab496 -->|calls| 0295e9e8_9e6c_edee_9cdd_3bb377028854 7b4c9028_73c1_6e8c_5317_60688210c25a["format()"] 0295e9e8_9e6c_edee_9cdd_3bb377028854 -->|calls| 7b4c9028_73c1_6e8c_5317_60688210c25a style 0295e9e8_9e6c_edee_9cdd_3bb377028854 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/prompts/base.py lines 318–332
async def aformat(self, **kwargs: Any) -> FormatOutputType:
"""Async format the prompt with the inputs.
Args:
**kwargs: Any arguments to be passed to the prompt template.
Returns:
A formatted string.
Example:
```python
await prompt.aformat(variable1="foo")
```
"""
return self.format(**kwargs)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does aformat() do?
aformat() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/base.py.
Where is aformat() defined?
aformat() is defined in libs/core/langchain_core/prompts/base.py at line 318.
What does aformat() call?
aformat() calls 1 function(s): format.
What calls aformat()?
aformat() is called by 1 function(s): aformat_document.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free