All specs 4 total
_extract_snippetREAL LLM gemma4:latest · · unknownsrc/aumai_confidentialrag/core.py
Extracts a text snippet centered around the earliest occurrence of any provided search term within the input text. It accepts the main text, a list of search terms, and a maximum desired length for the output. The function returns a string, which is the extracted snippet, potentially padded with ellipsis characters at the beginning and end if the snippet is not at the absolute start or end of the original text.
_extract_snippetREAL LLM gpt-oss:latest · · unknownsrc/aumai_confidentialrag/core.py
Extracts a snippet from the supplied text by locating the earliest occurrence of any term in the query_terms list, then returning a substring of at most max
_extract_snippettemplated static_v1 · O(n) · Apache-2.0src/aumai_confidentialrag/core.py · L217
Function `_extract_snippet` with 3 parameter(s); returns `str`. Contains 1 loop(s).
_extract_snippettemplated gemma4 · O(N) · Apache-2.0src/aumai_confidentialrag/core.py · L217
The function analyzes an input text to locate the earliest occurrence of any term provided in a list of query terms. If no query terms are found within the text, it returns a truncated version of the original text, limited by the maximum specified length. If terms are found, it extracts a substring of the original text, aiming to center the snippet around the first detected term, and ensuring the length does not exceed the maximum allowed length. The resulting snippet is padded with ellipsis characters ('...') at the beginning and/or end if the extracted content does not span the full boundaries of the original text.