core[patch]: don't serialize BasePromptTemplate.input_types (#24516)

Candidate fix for #24513
This commit is contained in:
Bagatur
2024-07-22 13:30:16 -07:00
committed by GitHub
parent df357f82ca
commit 8a140ee77c
3 changed files with 230 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ class BasePromptTemplate(
prompt."""
optional_variables: List[str] = Field(default=[])
"""A list of the names of the variables that are optional in the prompt."""
input_types: Dict[str, Any] = Field(default_factory=dict)
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."""
output_parser: Optional[BaseOutputParser] = None