Skip to content

Commit 553ac18

Browse files
dongyushengmdrxy
andauthored
docs: add deprecation notice for PipelinePromptTemplate (#31999)
**PR title**: add deprecation notice for PipelinePromptTemplate **PR message**: In the API documentation, PipelinePromptTemplate is marked as deprecated, but this is not mentioned in the docs. I'm submitting this PR to add a deprecation notice to the docs. **Tests**: N/A (documentation only) --------- Co-authored-by: Mason Daugherty <[email protected]>
1 parent 6dcca35 commit 553ac18

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

docs/docs/how_to/prompts_composition.ipynb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,18 @@
178178
"## Using PipelinePrompt"
179179
]
180180
},
181+
{
182+
"cell_type": "markdown",
183+
"id": "8ccadbae",
184+
"metadata": {},
185+
"source": [
186+
":::warning Deprecated\n",
187+
"\n",
188+
"PipelinePromptTemplate is deprecated; for more information, please refer to [PipelinePromptTemplate](https://python.langchain.com/api_reference/core/prompts/langchain_core.prompts.pipeline.PipelinePromptTemplate.html).\n",
189+
"\n",
190+
":::"
191+
]
192+
},
181193
{
182194
"cell_type": "markdown",
183195
"id": "0a5892f9-e4d8-4b7c-b6a5-4651539b9734",

libs/core/langchain_core/prompts/pipeline.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ def _get_inputs(inputs: dict, input_variables: list[str]) -> dict:
1818
since="0.3.22",
1919
removal="1.0",
2020
message=(
21-
"This class is deprecated. Please see the docstring below or at the link"
22-
" for a replacement option: "
23-
"https://python.langchain.com/api_reference/core/prompts/langchain_core.prompts.pipeline.PipelinePromptTemplate.html"
21+
"This class is deprecated in favor of chaining individual prompts together."
2422
),
2523
)
2624
class PipelinePromptTemplate(BasePromptTemplate):
27-
"""[DEPRECATED] Pipeline prompt template.
25+
"""Pipeline prompt template.
2826
2927
This has been deprecated in favor of chaining individual prompts together in your
30-
code. E.g. using a for loop, you could do:
28+
code; e.g. using a for loop, you could do:
3129
3230
.. code-block:: python
3331

0 commit comments

Comments
 (0)