nucliadb-sdk 6.5.0.post4476__py3-none-any.whl → 6.5.0.post4488__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.
nucliadb_sdk/v2/sdk.py CHANGED
@@ -77,6 +77,8 @@ from nucliadb_models.search import (
77
77
  AnswerAskResponseItem,
78
78
  AskRequest,
79
79
  AskResponseItem,
80
+ AugmentedContext,
81
+ AugmentedContextResponseItem,
80
82
  CatalogRequest,
81
83
  CatalogResponse,
82
84
  CitationsAskResponseItem,
@@ -472,6 +474,7 @@ def ask_response_parser(response_type: Type[BaseModel], response: httpx.Response
472
474
  timings = None
473
475
  error: Optional[str] = None
474
476
  debug = None
477
+ augmented_context: Optional[AugmentedContext] = None
475
478
  for line in response.iter_lines():
476
479
  try:
477
480
  item = AskResponseItem.model_validate_json(line).item
@@ -496,6 +499,8 @@ def ask_response_parser(response_type: Type[BaseModel], response: httpx.Response
496
499
  error = item.error
497
500
  elif isinstance(item, DebugAskResponseItem):
498
501
  debug = item.metadata
502
+ elif isinstance(item, AugmentedContextResponseItem):
503
+ augmented_context = item.augmented
499
504
  else:
500
505
  warnings.warn(f"Unknown item in ask endpoint response: {item}")
501
506
  except ValidationError:
@@ -520,6 +525,7 @@ def ask_response_parser(response_type: Type[BaseModel], response: httpx.Response
520
525
  "citations": citations,
521
526
  "debug": debug,
522
527
  "metadata": SyncAskMetadata(tokens=tokens, timings=timings),
528
+ "augmented_context": augmented_context,
523
529
  }
524
530
  )
525
531
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb_sdk
3
- Version: 6.5.0.post4476
3
+ Version: 6.5.0.post4488
4
4
  Summary: NucliaDB SDK
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License-Expression: Apache-2.0
@@ -22,7 +22,7 @@ Requires-Dist: httpx
22
22
  Requires-Dist: orjson
23
23
  Requires-Dist: pydantic>=2.6
24
24
  Requires-Dist: nuclia-models>=0.24.2
25
- Requires-Dist: nucliadb-models>=6.5.0.post4476
25
+ Requires-Dist: nucliadb-models>=6.5.0.post4488
26
26
 
27
27
  # NucliaDB SDK
28
28
 
@@ -4,8 +4,8 @@ nucliadb_sdk/tests/__init__.py,sha256=74CI2MDrgAvfcsk1dRt543dUrqrfyWc6IFQdDdy2k_
4
4
  nucliadb_sdk/tests/fixtures.py,sha256=jeWHoLcJGOwX1-Dre-sqVFwwg5uWnR09ujLGPy7c3nQ,6731
5
5
  nucliadb_sdk/v2/__init__.py,sha256=XmxB8o1AUa3eWoxVHKMqXH88AESKM9IL8hFuI0KTR00,682
6
6
  nucliadb_sdk/v2/exceptions.py,sha256=fk4sEOUOgGpYe59DLxIkHflo4T6RcniwjY3VZGk4A70,1096
7
- nucliadb_sdk/v2/sdk.py,sha256=0SUcEI2opP4K0qWl-E1XukErsU7P-XUUUQrLT900NjM,46766
8
- nucliadb_sdk-6.5.0.post4476.dist-info/METADATA,sha256=IsUgx29xvnHDt76CjTyXgCSiQ8sPp9QmMHmrHgBRE5Y,6617
9
- nucliadb_sdk-6.5.0.post4476.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- nucliadb_sdk-6.5.0.post4476.dist-info/top_level.txt,sha256=_dCwt_JnsZ3463lfvc5KcM2wUQJ9aSvKSsAAjGH8R0Y,13
11
- nucliadb_sdk-6.5.0.post4476.dist-info/RECORD,,
7
+ nucliadb_sdk/v2/sdk.py,sha256=L1gVzuDWQhxE3bBiXQFUvvMHldoyeSrfuu1cUNo5XAI,47047
8
+ nucliadb_sdk-6.5.0.post4488.dist-info/METADATA,sha256=mgi13LiuxluSohmzgm62Fkmc_GjePF5qwFhuyLUzsGQ,6617
9
+ nucliadb_sdk-6.5.0.post4488.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ nucliadb_sdk-6.5.0.post4488.dist-info/top_level.txt,sha256=_dCwt_JnsZ3463lfvc5KcM2wUQJ9aSvKSsAAjGH8R0Y,13
11
+ nucliadb_sdk-6.5.0.post4488.dist-info/RECORD,,