Home / Function/ aformat() — langchain Function Reference

aformat() — langchain Function Reference

Architecture documentation for the aformat() function in chat.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3916fd95_3f4c_3139_05ee_a34850487826["aformat()"]
  4766cfc7_f772_eccc_6561_2122efd2c5e8["BaseStringMessagePromptTemplate"]
  3916fd95_3f4c_3139_05ee_a34850487826 -->|defined in| 4766cfc7_f772_eccc_6561_2122efd2c5e8
  ce3d7cb2_bdf3_ef85_e7ac_243cf6168a0f["aformat_messages()"]
  ce3d7cb2_bdf3_ef85_e7ac_243cf6168a0f -->|calls| 3916fd95_3f4c_3139_05ee_a34850487826
  294ec36d_5c45_aa10_07c1_4936f16dc663["aformat_messages()"]
  294ec36d_5c45_aa10_07c1_4936f16dc663 -->|calls| 3916fd95_3f4c_3139_05ee_a34850487826
  c5487c6c_d88c_b7f9_8f1f_8abaf332a76d["format()"]
  3916fd95_3f4c_3139_05ee_a34850487826 -->|calls| c5487c6c_d88c_b7f9_8f1f_8abaf332a76d
  d36019e2_748c_4684_2c57_330dbdc419a4["aformat()"]
  3916fd95_3f4c_3139_05ee_a34850487826 -->|calls| d36019e2_748c_4684_2c57_330dbdc419a4
  style 3916fd95_3f4c_3139_05ee_a34850487826 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/prompts/chat.py lines 295–304

    async def aformat(self, **kwargs: Any) -> BaseMessage:
        """Async format the prompt template.

        Args:
            **kwargs: Keyword arguments to use for formatting.

        Returns:
            Formatted message.
        """
        return self.format(**kwargs)

Subdomains

Frequently Asked Questions

What does aformat() do?
aformat() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/chat.py.
Where is aformat() defined?
aformat() is defined in libs/core/langchain_core/prompts/chat.py at line 295.
What does aformat() call?
aformat() calls 2 function(s): aformat, format.
What calls aformat()?
aformat() is called by 2 function(s): aformat_messages, aformat_messages.

Analyze Your Own Codebase

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

Try Supermodel Free