kodexa 7.4.415054195687__py3-none-any.whl → 7.4.415279448694__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kodexa/dataclasses/__init__.py +21 -3
- kodexa/model/objects.py +2 -0
- {kodexa-7.4.415054195687.dist-info → kodexa-7.4.415279448694.dist-info}/METADATA +1 -1
- {kodexa-7.4.415054195687.dist-info → kodexa-7.4.415279448694.dist-info}/RECORD +6 -6
- {kodexa-7.4.415054195687.dist-info → kodexa-7.4.415279448694.dist-info}/LICENSE +0 -0
- {kodexa-7.4.415054195687.dist-info → kodexa-7.4.415279448694.dist-info}/WHEEL +0 -0
kodexa/dataclasses/__init__.py
CHANGED
@@ -318,9 +318,27 @@ class LLMDataObject(BaseModel):
|
|
318
318
|
tag_uuid = str(uuid.uuid4())
|
319
319
|
for node in nodes_to_label:
|
320
320
|
if node:
|
321
|
+
confidence = -1 if value.value_path == 'DERIVED' else 1
|
322
|
+
|
323
|
+
textract_confidence_score_feature = node.get_feature(
|
324
|
+
"textract", "confidence"
|
325
|
+
)
|
326
|
+
if textract_confidence_score_feature is not None:
|
327
|
+
textract_confidence_value = (
|
328
|
+
textract_confidence_score_feature.value
|
329
|
+
)
|
330
|
+
|
331
|
+
if (
|
332
|
+
textract_confidence_value
|
333
|
+
and len(textract_confidence_value) > 0
|
334
|
+
):
|
335
|
+
confidence = textract_confidence_value[0]
|
336
|
+
confidence = confidence / 100
|
337
|
+
|
338
|
+
logger.info(f"Confidence: {confidence}")
|
339
|
+
|
321
340
|
if not node.has_tag(tag):
|
322
|
-
try:
|
323
|
-
confidence = -1 if value.value_path == 'DERIVED' else 1
|
341
|
+
try:
|
324
342
|
node.tag(
|
325
343
|
tag_to_apply=tag,
|
326
344
|
value=value.normalized_text,
|
@@ -339,7 +357,7 @@ class LLMDataObject(BaseModel):
|
|
339
357
|
new_tag = Tag(cell_index=self.cell_index,
|
340
358
|
uuid=tag_uuid,
|
341
359
|
value=value.normalized_text,
|
342
|
-
confidence
|
360
|
+
confidence=confidence,
|
343
361
|
group_uuid=self.group_uuid,
|
344
362
|
parent_group_uuid=parent_group_uuid,
|
345
363
|
owner_uri=f"assistant://{assistant.id}" if assistant else f"model://taxonomy-llm")
|
kodexa/model/objects.py
CHANGED
@@ -4833,6 +4833,8 @@ class ModelInteraction(BaseModel):
|
|
4833
4833
|
model_id: Optional[str] = Field(None, alias="modelId")
|
4834
4834
|
input_tokens: Optional[int] = Field(None, alias="inputTokens")
|
4835
4835
|
output_tokens: Optional[int] = Field(None, alias="outputTokens")
|
4836
|
+
thinking_tokens: Optional[int] = Field(None, alias="thinkingTokens")
|
4837
|
+
cached_tokens: Optional[int] = Field(None, alias="cachedTokens")
|
4836
4838
|
duration: Optional[int] = None
|
4837
4839
|
note: Optional[str] = None
|
4838
4840
|
|
@@ -3,7 +3,7 @@ kodexa/assistant/__init__.py,sha256=nlXm_YnV_50hgn0TIT2Fkc2fQ-86OjmctY_j8My9nc4,
|
|
3
3
|
kodexa/assistant/assistant.py,sha256=5KFdbqFSLIZJyDRyZdpcfr448fT-CW4JhYu9A6B9DGY,14663
|
4
4
|
kodexa/connectors/__init__.py,sha256=WF6G_MUeU32TlKSUKkpNoNX7dq8iBPliFMep4E8BmZc,328
|
5
5
|
kodexa/connectors/connectors.py,sha256=FpUZDkSyHld2b9eYRuVOWzaFtuGoaRuPXXicJB7THbc,10413
|
6
|
-
kodexa/dataclasses/__init__.py,sha256=
|
6
|
+
kodexa/dataclasses/__init__.py,sha256=TuSMJAG9rMr5FHjBk66yFnlRmCMvrkBVnD7bORRmi38,20287
|
7
7
|
kodexa/dataclasses/templates/llm_data_class.j2,sha256=YWjStW136chV_59JM3AYis3i-0jdrqDvLXsISUW9zDU,660
|
8
8
|
kodexa/model/__init__.py,sha256=rtLXYJBxB-rnukhslN9rlqoB3--1H3253HyHGbD_Gc8,796
|
9
9
|
kodexa/model/base.py,sha256=CaZK8nMhT1LdCpt4aLhebJGcorjq9qRID1FjnXnP14M,521
|
@@ -13,7 +13,7 @@ kodexa/model/entities/product.py,sha256=StUhTEeLXmc05cj6XnZppQfeJsqCPbX1jdhsysHH
|
|
13
13
|
kodexa/model/entities/product_group.py,sha256=540fRGyUf34h1BzAN1DiWu6rGgvaj3xDFhZ2k-RvSFY,3617
|
14
14
|
kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
|
15
15
|
kodexa/model/model.py,sha256=q3zEm6pPOB-xPCKbOxmTMqLALzmQr2Ppam8knApoSEE,119645
|
16
|
-
kodexa/model/objects.py,sha256=
|
16
|
+
kodexa/model/objects.py,sha256=aBiz7QL44IXNrUaq3EndVY7vnpiIYBMBzHTiYcx_KHA,200629
|
17
17
|
kodexa/model/persistence.py,sha256=jUgQ8xwsAFIoZ_bEynxCDEWhUII42eN0e0Mum0dkQPg,72043
|
18
18
|
kodexa/model/utils.py,sha256=YEG3f8YzBil06D0P3_dfx2S9GnHREzyrjnlWwQ7oPlU,3038
|
19
19
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
@@ -45,7 +45,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
|
|
45
45
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
46
46
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
47
|
kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
|
48
|
-
kodexa-7.4.
|
49
|
-
kodexa-7.4.
|
50
|
-
kodexa-7.4.
|
51
|
-
kodexa-7.4.
|
48
|
+
kodexa-7.4.415279448694.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
49
|
+
kodexa-7.4.415279448694.dist-info/METADATA,sha256=K56e4Efv8K3ummtuVSlvfn7OABENsyUDKsJql-G81mA,2916
|
50
|
+
kodexa-7.4.415279448694.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
51
|
+
kodexa-7.4.415279448694.dist-info/RECORD,,
|
File without changes
|
File without changes
|