mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
style: remove Defaults to None (#33404)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user