process_text()
Process raw text through the pipeline (skips extraction).
Signature
def process_text(
text: str,
*,
config: DistillConfig | None = None,
filename: str = "input.txt",
embed: bool = True,
) -> ProcessingResult:Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
text | str | required | Raw text to process |
config | DistillConfig | None | Pipeline configuration |
filename | str | "input.txt" | Virtual filename for metadata |
embed | bool | True | Whether to generate embeddings |
Returns
ProcessingResult — same structure as process_document().
Examples
from distillcore import process_text
result = process_text(
"The court hereby orders that the motion to dismiss is denied...",
filename="order.txt",
)Without LLM features
from distillcore import process_text, DistillConfig, DomainConfig
result = process_text(
"Some text to chunk without any LLM calls.",
config=DistillConfig(domain=DomainConfig(), enrich_chunks=False),
embed=False,
)Async Version
from distillcore import process_text_async
result = await process_text_async("The court hereby orders...")