We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffe2fc7 commit f923730Copy full SHA for f923730
python/pathway/xpacks/llm/parsers.py
@@ -91,14 +91,15 @@ class ParseUnstructured(pw.UDF):
91
92
def __init__(
93
self,
94
- mode: str = "single",
+ mode: Literal["single", "elements", "paged"] = "single",
95
post_processors: list[Callable] | None = None,
96
+ cache_strategy: udfs.CacheStrategy | None = None,
97
**unstructured_kwargs: Any,
98
):
99
with optional_imports("xpack-llm-docs"):
100
import unstructured.partition.auto # noqa:F401
101
- super().__init__()
102
+ super().__init__(cache_strategy=cache_strategy)
103
_valid_modes = {"single", "elements", "paged"}
104
if mode not in _valid_modes:
105
raise ValueError(
0 commit comments