get_prompts() — langchain Function Reference
Architecture documentation for the get_prompts() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 355a6334_f5bf_d779_2051_cecbe0cbd12b["get_prompts()"] 4a62481c_02cb_a5de_1833_50669d5351a6["Runnable"] 355a6334_f5bf_d779_2051_cecbe0cbd12b -->|defined in| 4a62481c_02cb_a5de_1833_50669d5351a6 0d15d94e_1356_d663_2931_94fce971d5bd["get_graph()"] 355a6334_f5bf_d779_2051_cecbe0cbd12b -->|calls| 0d15d94e_1356_d663_2931_94fce971d5bd style 355a6334_f5bf_d779_2051_cecbe0cbd12b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 605–616
def get_prompts(
self, config: RunnableConfig | None = None
) -> list[BasePromptTemplate]:
"""Return a list of prompts used by this `Runnable`."""
# Import locally to prevent circular import
from langchain_core.prompts.base import BasePromptTemplate # noqa: PLC0415
return [
node.data
for node in self.get_graph(config=config).nodes.values()
if isinstance(node.data, BasePromptTemplate)
]
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does get_prompts() do?
get_prompts() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is get_prompts() defined?
get_prompts() is defined in libs/core/langchain_core/runnables/base.py at line 605.
What does get_prompts() call?
get_prompts() calls 1 function(s): get_graph.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free