Home / File/ prompts.py — langchain Source File

prompts.py — langchain Source File

Architecture documentation for prompts.py, a python file in the langchain codebase. 1 imports, 0 dependents.

File python 1 imports

Entity Profile

Dependency Diagram

graph LR
  dafc3794_2594_6ee2_8a4c_91289a7dfabb["prompts.py"]
  4b3dcc0f_d872_0044_39ec_2d289f87f9e6["langchain_core.prompts.prompt"]
  dafc3794_2594_6ee2_8a4c_91289a7dfabb --> 4b3dcc0f_d872_0044_39ec_2d289f87f9e6
  style dafc3794_2594_6ee2_8a4c_91289a7dfabb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from langchain_core.prompts.prompt import PromptTemplate

NAIVE_FIX = """Instructions:
--------------
{instructions}
--------------
Completion:
--------------
{completion}
--------------

Above, the Completion did not satisfy the constraints given in the Instructions.
Error:
--------------
{error}
--------------

Please try again. Please only respond with an answer that satisfies the constraints laid out in the Instructions:"""  # noqa: E501


NAIVE_FIX_PROMPT = PromptTemplate.from_template(NAIVE_FIX)

Dependencies

  • langchain_core.prompts.prompt

Frequently Asked Questions

What does prompts.py do?
prompts.py is a source file in the langchain codebase, written in python.
What does prompts.py depend on?
prompts.py imports 1 module(s): langchain_core.prompts.prompt.
Where is prompts.py in the architecture?
prompts.py is located at libs/langchain/langchain_classic/output_parsers/prompts.py (directory: libs/langchain/langchain_classic/output_parsers).

Analyze Your Own Codebase

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

Try Supermodel Free