Home / Function/ aformat() — langchain Function Reference

aformat() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  bbf6e932_5147_518b_e7a3_3d9cae8701f6["aformat()"]
  6a465cb4_c33a_e368_ad81_def98b4d2da2["ImagePromptTemplate"]
  bbf6e932_5147_518b_e7a3_3d9cae8701f6 -->|defined in| 6a465cb4_c33a_e368_ad81_def98b4d2da2
  95eb0b40_bc2d_888f_dc2e_0641d1268008["aformat_prompt()"]
  95eb0b40_bc2d_888f_dc2e_0641d1268008 -->|calls| bbf6e932_5147_518b_e7a3_3d9cae8701f6
  style bbf6e932_5147_518b_e7a3_3d9cae8701f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/prompts/image.py lines 134–143

    async def aformat(self, **kwargs: Any) -> ImageURL:
        """Async format the prompt with the inputs.

        Args:
            **kwargs: Any arguments to be passed to the prompt template.

        Returns:
            A formatted string.
        """
        return await run_in_executor(None, self.format, **kwargs)

Subdomains

Called By

Frequently Asked Questions

What does aformat() do?
aformat() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/image.py.
Where is aformat() defined?
aformat() is defined in libs/core/langchain_core/prompts/image.py at line 134.
What calls aformat()?
aformat() is called by 1 function(s): aformat_prompt.

Analyze Your Own Codebase

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

Try Supermodel Free