nucliadb 6.2.1.post2912__py3-none-any.whl → 6.2.1.post2939__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.
@@ -42,6 +42,7 @@ from nucliadb.search.search.chat.images import (
42
42
  )
43
43
  from nucliadb.search.search.hydrator import hydrate_field_text, hydrate_resource_text
44
44
  from nucliadb.search.search.paragraphs import get_paragraph_text
45
+ from nucliadb_models.labels import translate_alias_to_system_label
45
46
  from nucliadb_models.metadata import Extra, Origin
46
47
  from nucliadb_models.search import (
47
48
  SCORE_TYPE,
@@ -267,7 +268,9 @@ async def full_resource_prompt_context(
267
268
  if strategy.apply_to is not None:
268
269
  # decide whether the resource should be extended or not
269
270
  for label in strategy.apply_to.exclude:
270
- skip = skip or (label in (paragraph.labels or []))
271
+ skip = skip or (
272
+ translate_alias_to_system_label(label) in (paragraph.labels or [])
273
+ )
271
274
 
272
275
  if not skip:
273
276
  ordered_resources.append(resource_uuid)
@@ -97,9 +97,13 @@ async def generate_field_streaming_payloads(
97
97
  tl.field = field
98
98
  tl.field_type = field_type
99
99
  tl.split = split
100
- extracted = await get_field_text(kbid, rid, field, field_type)
101
- if extracted is not None:
102
- tl.text.CopyFrom(extracted)
100
+
101
+ if trainset.exclude_text:
102
+ tl.text.text = ""
103
+ else:
104
+ extracted = await get_field_text(kbid, rid, field, field_type)
105
+ if extracted is not None:
106
+ tl.text.CopyFrom(extracted)
103
107
 
104
108
  metadata_obj = await get_field_metadata(kbid, rid, field, field_type)
105
109
  if metadata_obj is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.2.1.post2912
3
+ Version: 6.2.1.post2939
4
4
  Home-page: https://docs.nuclia.dev/docs/management/nucliadb/intro
5
5
  Author: NucliaDB Community
6
6
  Author-email: nucliadb@nuclia.com
@@ -22,10 +22,10 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
23
  Requires-Python: >=3.9, <4
24
24
  Description-Content-Type: text/markdown
25
- Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post2912
26
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2912
27
- Requires-Dist: nucliadb-protos>=6.2.1.post2912
28
- Requires-Dist: nucliadb-models>=6.2.1.post2912
25
+ Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post2939
26
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2939
27
+ Requires-Dist: nucliadb-protos>=6.2.1.post2939
28
+ Requires-Dist: nucliadb-models>=6.2.1.post2939
29
29
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
30
30
  Requires-Dist: nucliadb-node-binding>=2.26.0
31
31
  Requires-Dist: nuclia-models>=0.24.2
@@ -237,7 +237,7 @@ nucliadb/search/search/chat/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn
237
237
  nucliadb/search/search/chat/ask.py,sha256=4PHueXt4dMF6NHuBYII--reCslbAVCzAE4LgWFAiKdY,35143
238
238
  nucliadb/search/search/chat/exceptions.py,sha256=Siy4GXW2L7oPhIR86H3WHBhE9lkV4A4YaAszuGGUf54,1356
239
239
  nucliadb/search/search/chat/images.py,sha256=PA8VWxT5_HUGfW1ULhKTK46UBsVyINtWWqEM1ulzX1E,3095
240
- nucliadb/search/search/chat/prompt.py,sha256=HHzBOMUDta7We_zQqpI-eBLNCFdB0BfYDhijvTmw1k0,46952
240
+ nucliadb/search/search/chat/prompt.py,sha256=r2JTiRWH3YHPdeRAG5w6gD0g0fWVxdTjYIR86qAVa7k,47106
241
241
  nucliadb/search/search/chat/query.py,sha256=4cmTxnqnvQGPDKTdaNJL4Au8aop1reHLXzkGNhf4NWg,15345
242
242
  nucliadb/search/search/query_parser/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
243
243
  nucliadb/search/search/query_parser/exceptions.py,sha256=tuzl7ZyvVsRz6u0_3zMe60vx39nd3pi641prs-5nC0E,872
@@ -292,7 +292,7 @@ nucliadb/train/api/v1/shards.py,sha256=GJRnQe8P-7_VTIN1oxVmxlrDA08qVN7opEZdbF4Wx
292
292
  nucliadb/train/api/v1/trainset.py,sha256=kpnpDgiMWr1FKHZJgwH7hue5kzilA8-i9X0YHlNeHuU,2113
293
293
  nucliadb/train/generators/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
294
294
  nucliadb/train/generators/field_classifier.py,sha256=yatj7U-LHRN5xTR6XsYz_3acIAUKTcpkNZcZaSY8MtE,3482
295
- nucliadb/train/generators/field_streaming.py,sha256=flCFNfrc2Xc270Oq6M8WFxaKzPLjvSCxljrMbC76SBY,5307
295
+ nucliadb/train/generators/field_streaming.py,sha256=kjwg4VNiROVqVDN--mRd4ylLw55Sg2VYxKRDdbmpYSM,5398
296
296
  nucliadb/train/generators/image_classifier.py,sha256=NZ993L1Fxjc7kB_yEMhCpdlMaNQbPrFz2LOUiF9eSYs,6730
297
297
  nucliadb/train/generators/paragraph_classifier.py,sha256=0pOZYcT1cAmG7gjSD1HIUaMM5T3Ag-96iUTXRhiV8MI,2761
298
298
  nucliadb/train/generators/paragraph_streaming.py,sha256=dsM7a5hBd2iokvFuxnZhQeko4Jad6djyP2p3tevku8A,3586
@@ -340,9 +340,9 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
340
340
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
341
341
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
342
342
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
343
- nucliadb-6.2.1.post2912.dist-info/METADATA,sha256=jdqoIhDsWH3-cnQHY5FU4EQSidIHG6pxm-ZFbISgC98,4689
344
- nucliadb-6.2.1.post2912.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
345
- nucliadb-6.2.1.post2912.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
346
- nucliadb-6.2.1.post2912.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
347
- nucliadb-6.2.1.post2912.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
348
- nucliadb-6.2.1.post2912.dist-info/RECORD,,
343
+ nucliadb-6.2.1.post2939.dist-info/METADATA,sha256=v43eBBa6Zynrfb6MsnDdR8rA8IQY_7HIGtVBYssM-TI,4689
344
+ nucliadb-6.2.1.post2939.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
345
+ nucliadb-6.2.1.post2939.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
346
+ nucliadb-6.2.1.post2939.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
347
+ nucliadb-6.2.1.post2939.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
348
+ nucliadb-6.2.1.post2939.dist-info/RECORD,,