mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 13:54:48 +00:00
docs: change for optional variables in chatprompt (#25017)
Fixes #24884
This commit is contained in:
parent
423d286546
commit
8f33fce871
@ -46,7 +46,9 @@ class BasePromptTemplate(
|
||||
"""A list of the names of the variables whose values are required as inputs to the
|
||||
prompt."""
|
||||
optional_variables: List[str] = Field(default=[])
|
||||
"""A list of the names of the variables that are optional in the prompt."""
|
||||
"""optional_variables: A list of the names of the variables for placeholder
|
||||
or MessagePlaceholder that are optional. These variables are auto inferred
|
||||
from the prompt and user need not provide them."""
|
||||
input_types: Dict[str, Any] = Field(default_factory=dict, exclude=True)
|
||||
"""A dictionary of the types of the variables the prompt template expects.
|
||||
If not provided, all variables are assumed to be strings."""
|
||||
|
@ -946,8 +946,9 @@ class ChatPromptTemplate(BaseChatPromptTemplate):
|
||||
template_format: format of the template. Defaults to "f-string".
|
||||
input_variables: A list of the names of the variables whose values are
|
||||
required as inputs to the prompt.
|
||||
optional_variables: A list of the names of the variables that are optional
|
||||
in the prompt.
|
||||
optional_variables: A list of the names of the variables for placeholder
|
||||
or MessagePlaceholder that are optional. These variables are auto inferred
|
||||
from the prompt and user need not provide them.
|
||||
partial_variables: A dictionary of the partial variables the prompt
|
||||
template carries. Partial variables populate the template so that you
|
||||
don't need to pass them in every time you call the prompt.
|
||||
|
Loading…
Reference in New Issue
Block a user