Home / Function/ format_prompt() — langchain Function Reference

format_prompt() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  24bd1a9c_f02c_2911_efd9_da075dd6cda5["format_prompt()"]
  6a465cb4_c33a_e368_ad81_def98b4d2da2["ImagePromptTemplate"]
  24bd1a9c_f02c_2911_efd9_da075dd6cda5 -->|defined in| 6a465cb4_c33a_e368_ad81_def98b4d2da2
  dedbfd05_46bc_9cd0_b34a_11d767ba397b["format()"]
  24bd1a9c_f02c_2911_efd9_da075dd6cda5 -->|calls| dedbfd05_46bc_9cd0_b34a_11d767ba397b
  style 24bd1a9c_f02c_2911_efd9_da075dd6cda5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/prompts/image.py lines 62–71

    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 ImagePromptValue(image_url=self.format(**kwargs))

Subdomains

Calls

Frequently Asked Questions

What does format_prompt() do?
format_prompt() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/image.py.
Where is format_prompt() defined?
format_prompt() is defined in libs/core/langchain_core/prompts/image.py at line 62.
What does format_prompt() call?
format_prompt() calls 1 function(s): format.

Analyze Your Own Codebase

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

Try Supermodel Free