style: remove Defaults to None (#33404)

This commit is contained in:
Mason Daugherty
2025-10-09 17:27:35 -04:00
committed by GitHub
parent 6fc21afbc9
commit 5f9e3e33cd
48 changed files with 320 additions and 320 deletions

View File

@@ -135,7 +135,7 @@ class MessagesPlaceholder(BaseMessagePromptTemplate):
n_messages: PositiveInt | None = None
"""Maximum number of messages to include. If `None`, then will include all.
Defaults to `None`."""
"""
def __init__(
self, variable_name: str, *, optional: bool = False, **kwargs: Any
@@ -241,7 +241,7 @@ class BaseStringMessagePromptTemplate(BaseMessagePromptTemplate, ABC):
`"{variable1} {variable2}"`, and `partial_variables` is
`{"variable1": "foo"}`, then the final prompt will be
`"foo {variable2}"`.
Defaults to `None`.
**kwargs: keyword arguments to pass to the constructor.
Returns:
@@ -414,7 +414,7 @@ class _StringImageMessagePromptTemplate(BaseMessagePromptTemplate):
template_format: format of the template.
Options are: 'f-string', 'mustache', 'jinja2'. Defaults to "f-string".
partial_variables: A dictionary of variables that can be used too partially.
Defaults to `None`.
**kwargs: keyword arguments to pass to the constructor.
Returns:

View File

@@ -139,7 +139,7 @@ def load_prompt(path: str | Path, encoding: str | None = None) -> BasePromptTemp
Args:
path: Path to the prompt file.
encoding: Encoding of the file. Defaults to `None`.
encoding: Encoding of the file.
Returns:
A PromptTemplate object.

View File

@@ -281,7 +281,7 @@ class PromptTemplate(StringPromptTemplate):
fill in the template. For example, if the template is
`"{variable1} {variable2}"`, and `partial_variables` is
`{"variable1": "foo"}`, then the final prompt will be
`"foo {variable2}"`. Defaults to `None`.
`"foo {variable2}"`.
**kwargs: Any other arguments to pass to the prompt template.
Returns:

View File

@@ -144,7 +144,7 @@ class StructuredPrompt(ChatPromptTemplate):
Args:
others: The language model to pipe the structured prompt to.
name: The name of the pipeline. Defaults to `None`.
name: The name of the pipeline.
Returns:
A RunnableSequence object.