mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 11:07:36 +00:00
docs(core): Updated docs for mustache_template_vars (#33481)
This commit is contained in:
committed by
GitHub
parent
9f470d297f
commit
eddfcd2c88
@@ -122,13 +122,16 @@ def mustache_formatter(template: str, /, **kwargs: Any) -> str:
|
||||
def mustache_template_vars(
|
||||
template: str,
|
||||
) -> set[str]:
|
||||
"""Get the variables from a mustache template.
|
||||
"""Get the top-level variables from a mustache template.
|
||||
|
||||
For nested variables like `{{person.name}}`, only the top-level
|
||||
key (`person`) is returned.
|
||||
|
||||
Args:
|
||||
template: The template string.
|
||||
|
||||
Returns:
|
||||
The variables from the template.
|
||||
The top-level variables from the template.
|
||||
"""
|
||||
variables: set[str] = set()
|
||||
section_depth = 0
|
||||
|
||||
Reference in New Issue
Block a user