nucliadb 6.3.1.post3459__py3-none-any.whl → 6.3.1.post3470__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.
@@ -437,14 +437,32 @@ class NotEnoughContextAskResult(AskResult):
437
437
  context in the corpus to answer.
438
438
  """
439
439
  yield self._ndjson_encode(RetrievalAskResponseItem(results=self.main_results))
440
+ if self.prequeries_results:
441
+ yield self._ndjson_encode(
442
+ PrequeriesAskResponseItem(
443
+ results={
444
+ prequery.id or f"prequery_{index}": prequery_result
445
+ for index, (prequery, prequery_result) in enumerate(self.prequeries_results)
446
+ }
447
+ )
448
+ )
440
449
  yield self._ndjson_encode(AnswerAskResponseItem(text=NOT_ENOUGH_CONTEXT_ANSWER))
441
450
  status = AnswerStatusCode.NO_RETRIEVAL_DATA
442
451
  yield self._ndjson_encode(StatusAskResponseItem(code=status.value, status=status.prettify()))
443
452
 
444
453
  async def json(self) -> str:
454
+ prequeries = (
455
+ {
456
+ prequery.id or f"prequery_{index}": prequery_result
457
+ for index, (prequery, prequery_result) in enumerate(self.prequeries_results)
458
+ }
459
+ if self.prequeries_results
460
+ else None
461
+ )
445
462
  return SyncAskResponse(
446
463
  answer=NOT_ENOUGH_CONTEXT_ANSWER,
447
464
  retrieval_results=self.main_results,
465
+ prequeries=prequeries,
448
466
  status=AnswerStatusCode.NO_RETRIEVAL_DATA.prettify(),
449
467
  ).model_dump_json()
450
468
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.3.1.post3459
3
+ Version: 6.3.1.post3470
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License: AGPL
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Requires-Python: <4,>=3.9
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: nucliadb-telemetry[all]>=6.3.1.post3459
24
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.1.post3459
25
- Requires-Dist: nucliadb-protos>=6.3.1.post3459
26
- Requires-Dist: nucliadb-models>=6.3.1.post3459
27
- Requires-Dist: nidx-protos>=6.3.1.post3459
23
+ Requires-Dist: nucliadb-telemetry[all]>=6.3.1.post3470
24
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.1.post3470
25
+ Requires-Dist: nucliadb-protos>=6.3.1.post3470
26
+ Requires-Dist: nucliadb-models>=6.3.1.post3470
27
+ Requires-Dist: nidx-protos>=6.3.1.post3470
28
28
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
29
29
  Requires-Dist: nuclia-models>=0.24.2
30
30
  Requires-Dist: uvicorn
@@ -232,7 +232,7 @@ nucliadb/search/search/shards.py,sha256=JSRSrHgHcF4sXyuZZoJdMfK0v_LHpoSRf1lCr5-K
232
232
  nucliadb/search/search/summarize.py,sha256=ksmYPubEQvAQgfPdZHfzB_rR19B2ci4IYZ6jLdHxZo8,4996
233
233
  nucliadb/search/search/utils.py,sha256=iF2tbBA56gRMJH1TlE2hMrqeXqjoeOPt4KgRdp2m9Ek,3313
234
234
  nucliadb/search/search/chat/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
235
- nucliadb/search/search/chat/ask.py,sha256=HPHM97s1dxbHvugoWZj6aP8vL4gzHjjtwoDvzUMaLfw,36547
235
+ nucliadb/search/search/chat/ask.py,sha256=olZT08JVo3ZGDsDXkjvI2JTlqQln_o91HJzv0TKFQ7I,37244
236
236
  nucliadb/search/search/chat/exceptions.py,sha256=Siy4GXW2L7oPhIR86H3WHBhE9lkV4A4YaAszuGGUf54,1356
237
237
  nucliadb/search/search/chat/images.py,sha256=PA8VWxT5_HUGfW1ULhKTK46UBsVyINtWWqEM1ulzX1E,3095
238
238
  nucliadb/search/search/chat/prompt.py,sha256=Jnja-Ss7skgnnDY8BymVfdeYsFPnIQFL8tEvcRXTKUE,47356
@@ -340,8 +340,8 @@ 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.3.1.post3459.dist-info/METADATA,sha256=zMGQyt7lrs7DRElv9VpHgno7KKh77BPxxoQ8EhmBUGY,4291
344
- nucliadb-6.3.1.post3459.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
345
- nucliadb-6.3.1.post3459.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
346
- nucliadb-6.3.1.post3459.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
347
- nucliadb-6.3.1.post3459.dist-info/RECORD,,
343
+ nucliadb-6.3.1.post3470.dist-info/METADATA,sha256=D70V8N1xQhfe8pD1j1CJs2JaOAn8Yf10reTomEznVFs,4291
344
+ nucliadb-6.3.1.post3470.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
345
+ nucliadb-6.3.1.post3470.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
346
+ nucliadb-6.3.1.post3470.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
347
+ nucliadb-6.3.1.post3470.dist-info/RECORD,,