mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 22:11:51 +00:00
Patch: improve type hint (#15451)
This commit is contained in:
@@ -98,7 +98,7 @@ class FewShotPromptTemplate(_FewShotPromptTemplateMixin, StringPromptTemplate):
|
||||
prefix: str = ""
|
||||
"""A prompt template string to put before the examples."""
|
||||
|
||||
template_format: Union[Literal["f-string"], Literal["jinja2"]] = "f-string"
|
||||
template_format: Literal["f-string", "jinja2"] = "f-string"
|
||||
"""The format of the prompt template. Options are: 'f-string', 'jinja2'."""
|
||||
|
||||
@root_validator()
|
||||
|
@@ -65,7 +65,7 @@ class PromptTemplate(StringPromptTemplate):
|
||||
template: str
|
||||
"""The prompt template."""
|
||||
|
||||
template_format: Union[Literal["f-string"], Literal["jinja2"]] = "f-string"
|
||||
template_format: Literal["f-string", "jinja2"] = "f-string"
|
||||
"""The format of the prompt template. Options are: 'f-string', 'jinja2'."""
|
||||
|
||||
validate_template: bool = False
|
||||
|
Reference in New Issue
Block a user