prompt.py — langchain Source File
Architecture documentation for prompt.py, a python file in the langchain codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 5a3435b4_69e3_6fb8_55bf_b67ee6526bd5["prompt.py"] 4b3dcc0f_d872_0044_39ec_2d289f87f9e6["langchain_core.prompts.prompt"] 5a3435b4_69e3_6fb8_55bf_b67ee6526bd5 --> 4b3dcc0f_d872_0044_39ec_2d289f87f9e6 cbcf15eb_bc5e_6dcb_257e_01464301bd36["langchain_classic.memory.prompt"] 5a3435b4_69e3_6fb8_55bf_b67ee6526bd5 --> cbcf15eb_bc5e_6dcb_257e_01464301bd36 style 5a3435b4_69e3_6fb8_55bf_b67ee6526bd5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from langchain_core.prompts.prompt import PromptTemplate
from langchain_classic.memory.prompt import (
ENTITY_EXTRACTION_PROMPT,
ENTITY_MEMORY_CONVERSATION_TEMPLATE,
ENTITY_SUMMARIZATION_PROMPT,
KNOWLEDGE_TRIPLE_EXTRACTION_PROMPT,
SUMMARY_PROMPT,
)
DEFAULT_TEMPLATE = """The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.
Current conversation:
{history}
Human: {input}
AI:""" # noqa: E501
PROMPT = PromptTemplate(input_variables=["history", "input"], template=DEFAULT_TEMPLATE)
# Only for backwards compatibility
__all__ = [
"ENTITY_EXTRACTION_PROMPT",
"ENTITY_MEMORY_CONVERSATION_TEMPLATE",
"ENTITY_SUMMARIZATION_PROMPT",
"KNOWLEDGE_TRIPLE_EXTRACTION_PROMPT",
"PROMPT",
"SUMMARY_PROMPT",
]
Dependencies
- langchain_classic.memory.prompt
- langchain_core.prompts.prompt
Source
Frequently Asked Questions
What does prompt.py do?
prompt.py is a source file in the langchain codebase, written in python.
What does prompt.py depend on?
prompt.py imports 2 module(s): langchain_classic.memory.prompt, langchain_core.prompts.prompt.
Where is prompt.py in the architecture?
prompt.py is located at libs/langchain/langchain_classic/chains/conversation/prompt.py (directory: libs/langchain/langchain_classic/chains/conversation).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free