Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies = [
"httpx>=0.25.2",
"pdfplumber>=0.11.2",
"redis>=5.2.1",
"llmwhisperer-client>=2.5.0",
"llmwhisperer-client>=2.8.0",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ class WhispererConfig:
MEDIAN_FILTER_SIZE = "median_filter_size"
GAUSSIAN_BLUR_RADIUS = "gaussian_blur_radius"
LINE_SPLITTER_TOLERANCE = "line_splitter_tolerance"
LINE_SPLITTER_STRATEGY = "line_spitter_strategy"
LINE_SPLITTER_STRATEGY = "line_splitter_strategy"
HORIZONTAL_STRETCH_FACTOR = "horizontal_stretch_factor"
PAGES_TO_EXTRACT = "pages_to_extract"
MARK_VERTICAL_LINES = "mark_vertical_lines"
MARK_HORIZONTAL_LINES = "mark_horizontal_lines"
# Misspelling retained: it is the key existing adapter configs are stored under
PAGE_SEPARATOR = "page_seperator"
URL_IN_POST = "url_in_post"
TAG = "tag"
Expand All @@ -77,6 +78,13 @@ class WhispererConfig:
LINES = "lines"


class WhispererParam:
"""Params passed to the client whose name differs from the config key."""

PAGE_SEPARATOR = "page_separator"
FILE_NAME = "file_name"


class WhisperStatus:
"""Values returned / used by /whisper-status endpoint."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
WhispererConfig,
WhispererDefaults,
WhispererHeader,
WhispererParam,
WhisperStatus,
)
from unstract.sdk.adapters.x2text.llm_whisperer_v2.src.dto import WhispererRequestParams
Expand Down Expand Up @@ -196,7 +197,7 @@ def get_whisperer_params(
WhispererConfig.MARK_HORIZONTAL_LINES,
WhispererDefaults.MARK_HORIZONTAL_LINES,
),
WhispererConfig.PAGE_SEPARATOR: config.get(
WhispererParam.PAGE_SEPARATOR: config.get(
WhispererConfig.PAGE_SEPARATOR,
WhispererDefaults.PAGE_SEPARATOR,
),
Expand Down Expand Up @@ -244,6 +245,8 @@ def send_whisper_request(
params = LLMWhispererHelper.get_whisperer_params(
config=config, extra_params=extra_params
)
# Recorded against the extraction for cross referencing in usage reports
params[WhispererParam.FILE_NAME] = Path(input_file_path).name
response: requests.Response
try:
input_file_data = BytesIO(fs.read(path=input_file_path, mode="rb"))
Expand Down