Skip to content

Commit d166fe2

Browse files
authored
Merge pull request #27 from Zipstack/feat/include-line-confidence-parameter
feat: Add include_line_confidence parameter to whisper method
2 parents ed35cce + 5531bc4 commit d166fe2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/unstract/llmwhisperer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.4.2"
1+
__version__ = "2.5.0"
22

33
from .client_v2 import LLMWhispererClientV2 # noqa: F401
44

src/unstract/llmwhisperer/client_v2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def whisper(
232232
mark_horizontal_lines: bool = False,
233233
line_spitter_strategy: str = "left-priority",
234234
add_line_nos: bool = False,
235+
include_line_confidence: bool = False,
235236
lang: str = "eng",
236237
tag: str = "default",
237238
filename: str = "",
@@ -263,6 +264,8 @@ def whisper(
263264
line_spitter_strategy (str, optional): The line splitter strategy. Defaults to "left-priority".
264265
add_line_nos (bool, optional): Adds line numbers to the extracted text and saves line metadata,
265266
which can be queried later using the highlights API.
267+
include_line_confidence (bool, optional): Adds line confidence to the line metadata returned by
268+
the highlights API. Requires add_line_nos to be enabled. Defaults to False.
266269
lang (str, optional): The language of the document. Defaults to "eng".
267270
tag (str, optional): The tag for the document. Defaults to "default".
268271
filename (str, optional): The name of the file to store in reports. Defaults to "".
@@ -298,6 +301,7 @@ def whisper(
298301
"mark_horizontal_lines": mark_horizontal_lines,
299302
"line_spitter_strategy": line_spitter_strategy,
300303
"add_line_nos": add_line_nos,
304+
"include_line_confidence": include_line_confidence,
301305
"lang": lang,
302306
"tag": tag,
303307
"filename": filename,

0 commit comments

Comments
 (0)