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 <github@mdrxy.com>
This commit is contained in:
董哥的黑板报 2025-07-14 23:27:29 +08:00 committed by GitHub
parent 6dcca35a34
commit 553ac1863b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 5 deletions

View File

@ -178,6 +178,18 @@
"## Using PipelinePrompt" "## Using PipelinePrompt"
] ]
}, },
{
"cell_type": "markdown",
"id": "8ccadbae",
"metadata": {},
"source": [
":::warning Deprecated\n",
"\n",
"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",
"\n",
":::"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "0a5892f9-e4d8-4b7c-b6a5-4651539b9734", "id": "0a5892f9-e4d8-4b7c-b6a5-4651539b9734",

View File

@ -18,16 +18,14 @@ def _get_inputs(inputs: dict, input_variables: list[str]) -> dict:
since="0.3.22", since="0.3.22",
removal="1.0", removal="1.0",
message=( message=(
"This class is deprecated. Please see the docstring below or at the link" "This class is deprecated in favor of chaining individual prompts together."
" for a replacement option: "
"https://python.langchain.com/api_reference/core/prompts/langchain_core.prompts.pipeline.PipelinePromptTemplate.html"
), ),
) )
class PipelinePromptTemplate(BasePromptTemplate): class PipelinePromptTemplate(BasePromptTemplate):
"""[DEPRECATED] Pipeline prompt template. """Pipeline prompt template.
This has been deprecated in favor of chaining individual prompts together in your This has been deprecated in favor of chaining individual prompts together in your
code. E.g. using a for loop, you could do: code; e.g. using a for loop, you could do:
.. code-block:: python .. code-block:: python