nucliadb 6.3.5.post4033__py3-none-any.whl → 6.3.5.post4041__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/search/search/chat/ask.py +2 -0
- nucliadb/search/search/chat/query.py +5 -0
- nucliadb/search/search/find.py +1 -0
- nucliadb/search/search/metrics.py +1 -0
- nucliadb/search/search/query.py +2 -0
- nucliadb/search/search/query_parser/parsers/find.py +2 -0
- {nucliadb-6.3.5.post4033.dist-info → nucliadb-6.3.5.post4041.dist-info}/METADATA +6 -6
- {nucliadb-6.3.5.post4033.dist-info → nucliadb-6.3.5.post4041.dist-info}/RECORD +11 -11
- {nucliadb-6.3.5.post4033.dist-info → nucliadb-6.3.5.post4041.dist-info}/WHEEL +0 -0
- {nucliadb-6.3.5.post4033.dist-info → nucliadb-6.3.5.post4041.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.3.5.post4033.dist-info → nucliadb-6.3.5.post4041.dist-info}/top_level.txt +0 -0
@@ -526,6 +526,7 @@ async def ask(
|
|
526
526
|
rephrase_time=rephrase_time,
|
527
527
|
user_query=user_query,
|
528
528
|
rephrased_query=rephrased_query,
|
529
|
+
retrieval_rephrase_query=err.main_query.rephrased_query if err.main_query else None,
|
529
530
|
text_answer=b"",
|
530
531
|
status_code=AnswerStatusCode.NO_RETRIEVAL_DATA,
|
531
532
|
chat_history=chat_history,
|
@@ -605,6 +606,7 @@ async def ask(
|
|
605
606
|
origin=origin,
|
606
607
|
user_query=user_query,
|
607
608
|
rephrased_query=rephrased_query,
|
609
|
+
retrieval_rephrased_query=retrieval_results.main_query.rephrased_query,
|
608
610
|
chat_history=chat_history,
|
609
611
|
learning_id=nuclia_learning_id,
|
610
612
|
query_context=prompt_context,
|
@@ -315,6 +315,7 @@ def maybe_audit_chat(
|
|
315
315
|
rephrase_time: Optional[float],
|
316
316
|
user_query: str,
|
317
317
|
rephrased_query: Optional[str],
|
318
|
+
retrieval_rephrase_query: Optional[str],
|
318
319
|
text_answer: bytes,
|
319
320
|
status_code: AnswerStatusCode,
|
320
321
|
chat_history: list[ChatContextMessage],
|
@@ -349,6 +350,7 @@ def maybe_audit_chat(
|
|
349
350
|
generative_answer_first_chunk_time=generative_answer_first_chunk_time,
|
350
351
|
rephrase_time=rephrase_time,
|
351
352
|
rephrased_question=rephrased_query,
|
353
|
+
retrieval_rephrased_question=retrieval_rephrase_query,
|
352
354
|
chat_context=chat_history_context,
|
353
355
|
retrieved_context=chat_retrieved_context,
|
354
356
|
answer=audit_answer,
|
@@ -380,6 +382,7 @@ class ChatAuditor:
|
|
380
382
|
origin: str,
|
381
383
|
user_query: str,
|
382
384
|
rephrased_query: Optional[str],
|
385
|
+
retrieval_rephrased_query: Optional[str],
|
383
386
|
chat_history: list[ChatContextMessage],
|
384
387
|
learning_id: Optional[str],
|
385
388
|
query_context: PromptContext,
|
@@ -392,6 +395,7 @@ class ChatAuditor:
|
|
392
395
|
self.origin = origin
|
393
396
|
self.user_query = user_query
|
394
397
|
self.rephrased_query = rephrased_query
|
398
|
+
self.retrieval_rephrased_query = retrieval_rephrased_query
|
395
399
|
self.chat_history = chat_history
|
396
400
|
self.learning_id = learning_id
|
397
401
|
self.query_context = query_context
|
@@ -413,6 +417,7 @@ class ChatAuditor:
|
|
413
417
|
origin=self.origin,
|
414
418
|
user_query=self.user_query,
|
415
419
|
rephrased_query=self.rephrased_query,
|
420
|
+
retrieval_rephrase_query=self.retrieval_rephrased_query,
|
416
421
|
generative_answer_time=generative_answer_time,
|
417
422
|
generative_answer_first_chunk_time=generative_answer_first_chunk_time,
|
418
423
|
rephrase_time=rephrase_time,
|
nucliadb/search/search/find.py
CHANGED
@@ -26,6 +26,7 @@ from nucliadb_telemetry import metrics
|
|
26
26
|
merge_observer = metrics.Observer("merge_results", labels={"type": ""})
|
27
27
|
node_features = metrics.Counter("nucliadb_node_features", labels={"type": ""})
|
28
28
|
query_parse_dependency_observer = metrics.Observer("query_parse_dependency", labels={"type": ""})
|
29
|
+
query_parser_observer = metrics.Observer("nucliadb_query_parser", labels={"type": ""})
|
29
30
|
|
30
31
|
buckets = [
|
31
32
|
0.005,
|
nucliadb/search/search/query.py
CHANGED
@@ -32,6 +32,7 @@ from nucliadb.search.search.filters import (
|
|
32
32
|
)
|
33
33
|
from nucliadb.search.search.metrics import (
|
34
34
|
node_features,
|
35
|
+
query_parser_observer,
|
35
36
|
)
|
36
37
|
from nucliadb.search.search.query_parser.fetcher import Fetcher
|
37
38
|
from nucliadb.search.search.rank_fusion import (
|
@@ -194,6 +195,7 @@ class QueryParser:
|
|
194
195
|
if self.with_synonyms and self.query:
|
195
196
|
asyncio.ensure_future(self.fetcher.get_synonyms())
|
196
197
|
|
198
|
+
@query_parser_observer.wrap({"type": "QueryParser"})
|
197
199
|
async def parse(self) -> tuple[nodereader_pb2.SearchRequest, bool, list[str], Optional[str]]:
|
198
200
|
"""
|
199
201
|
:return: (request, incomplete, autofilters)
|
@@ -20,6 +20,7 @@
|
|
20
20
|
|
21
21
|
from pydantic import ValidationError
|
22
22
|
|
23
|
+
from nucliadb.search.search.metrics import query_parser_observer
|
23
24
|
from nucliadb.search.search.query_parser.exceptions import InternalParserError
|
24
25
|
from nucliadb.search.search.query_parser.models import (
|
25
26
|
NoopReranker,
|
@@ -35,6 +36,7 @@ from nucliadb_models.search import (
|
|
35
36
|
)
|
36
37
|
|
37
38
|
|
39
|
+
@query_parser_observer.wrap({"type": "parse_find"})
|
38
40
|
async def parse_find(kbid: str, item: FindRequest) -> UnitRetrieval:
|
39
41
|
parser = _FindParser(kbid, item)
|
40
42
|
return await parser.parse()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.3.5.
|
3
|
+
Version: 6.3.5.post4041
|
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.5.
|
24
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.5.
|
25
|
-
Requires-Dist: nucliadb-protos>=6.3.5.
|
26
|
-
Requires-Dist: nucliadb-models>=6.3.5.
|
27
|
-
Requires-Dist: nidx-protos>=6.3.5.
|
23
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.3.5.post4041
|
24
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.5.post4041
|
25
|
+
Requires-Dist: nucliadb-protos>=6.3.5.post4041
|
26
|
+
Requires-Dist: nucliadb-models>=6.3.5.post4041
|
27
|
+
Requires-Dist: nidx-protos>=6.3.5.post4041
|
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[standard]
|
@@ -233,29 +233,29 @@ nucliadb/search/search/cut.py,sha256=ytY0_GY7ocNjfxTb4aosxEp4ZfhQNDP--JkhEMGD298
|
|
233
233
|
nucliadb/search/search/exceptions.py,sha256=klGLgAGGrXcSGix_W6418ZBMqDchAIGjN77ofkOScEI,1039
|
234
234
|
nucliadb/search/search/fetch.py,sha256=XJHIFnZmXM_8Kb37lb4lg1GYG7cZ1plT-qAIb_QziX4,6184
|
235
235
|
nucliadb/search/search/filters.py,sha256=1MkHlJjAQqoRCj7e5cEzK2HvBxGLE17I_omsjiklbtw,6476
|
236
|
-
nucliadb/search/search/find.py,sha256=
|
236
|
+
nucliadb/search/search/find.py,sha256=dGzk6gDN6xdtREhLcZxBX_rTppQ8O1WcSYJQE4r5h-o,10372
|
237
237
|
nucliadb/search/search/find_merge.py,sha256=3FnzKFEnVemg6FO_6zveulbAU7klvsiPEBvLrpBBMg8,17450
|
238
238
|
nucliadb/search/search/graph_merge.py,sha256=OiUNiXOWwrUVKqStuRcoUJwvDbDYamqIgiAy_FwPdMI,3405
|
239
239
|
nucliadb/search/search/graph_strategy.py,sha256=SPJdDHQcTFsNb1IEWdWzklC5j1Vv9igibo0dYQAgcy0,33113
|
240
240
|
nucliadb/search/search/hydrator.py,sha256=-R37gCrGxkyaiHQalnTWHNG_FCx11Zucd7qA1vQCxuw,6985
|
241
241
|
nucliadb/search/search/ingestion_agents.py,sha256=NeJr4EEX-bvFFMGvXOOwLv8uU7NuQ-ntJnnrhnKfMzY,3174
|
242
242
|
nucliadb/search/search/merge.py,sha256=fh5WnA_xnXp-Iiq5Cud9hIGole7_0OW2b3Oymk32D6Y,22689
|
243
|
-
nucliadb/search/search/metrics.py,sha256=
|
243
|
+
nucliadb/search/search/metrics.py,sha256=HJVQPLOIwLuc733G4keqEgx1-Dcg97hyWGKZQTojiSE,2973
|
244
244
|
nucliadb/search/search/paragraphs.py,sha256=pNAEiYqJGGUVcEf7xf-PFMVqz0PX4Qb-WNG-_zPGN2o,7799
|
245
245
|
nucliadb/search/search/pgcatalog.py,sha256=s_J98fsX_RuFXwpejpkGqG-tD9ELuzz4YQ6U3ew5h2g,9313
|
246
246
|
nucliadb/search/search/predict_proxy.py,sha256=IFI3v_ODz2_UU1XZnyaD391fE7-2C0npSmj_HmDvzS4,3123
|
247
|
-
nucliadb/search/search/query.py,sha256=
|
247
|
+
nucliadb/search/search/query.py,sha256=Obd84og7BQJ5zZd3iAc9kyndCTHv0ihSL3PO5GNljR4,30351
|
248
248
|
nucliadb/search/search/rank_fusion.py,sha256=tRGo_KlsFsVx1CQEy1iqQ6f0T1Dq1kf0axDXHuuzvvM,6946
|
249
249
|
nucliadb/search/search/rerankers.py,sha256=3vep4EOVNeDJGsMdx-1g6Ar4ZGJG3IHym3HkxnbwtAQ,7321
|
250
250
|
nucliadb/search/search/shards.py,sha256=OEtN1p9WX_cMX8t-myaafpmFAPTpUEOutR7z1sDuNcY,3242
|
251
251
|
nucliadb/search/search/summarize.py,sha256=ksmYPubEQvAQgfPdZHfzB_rR19B2ci4IYZ6jLdHxZo8,4996
|
252
252
|
nucliadb/search/search/utils.py,sha256=iF2tbBA56gRMJH1TlE2hMrqeXqjoeOPt4KgRdp2m9Ek,3313
|
253
253
|
nucliadb/search/search/chat/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
254
|
-
nucliadb/search/search/chat/ask.py,sha256=
|
254
|
+
nucliadb/search/search/chat/ask.py,sha256=OLZOfVKAJmnVW7KiKIfDVjYJphkDRd7cMa5NwUQbT-8,37421
|
255
255
|
nucliadb/search/search/chat/exceptions.py,sha256=Siy4GXW2L7oPhIR86H3WHBhE9lkV4A4YaAszuGGUf54,1356
|
256
256
|
nucliadb/search/search/chat/images.py,sha256=PA8VWxT5_HUGfW1ULhKTK46UBsVyINtWWqEM1ulzX1E,3095
|
257
257
|
nucliadb/search/search/chat/prompt.py,sha256=Jnja-Ss7skgnnDY8BymVfdeYsFPnIQFL8tEvcRXTKUE,47356
|
258
|
-
nucliadb/search/search/chat/query.py,sha256=
|
258
|
+
nucliadb/search/search/chat/query.py,sha256=ILWdd-0kaV97kR4wenwo4lX9K0GN-dXv957wL4CKvx8,16779
|
259
259
|
nucliadb/search/search/query_parser/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
260
260
|
nucliadb/search/search/query_parser/exceptions.py,sha256=szAOXUZ27oNY-OSa9t2hQ5HHkQQC0EX1FZz_LluJHJE,1224
|
261
261
|
nucliadb/search/search/query_parser/fetcher.py,sha256=vrPgPnebWlrbx9fcelw7eHayEDptxnm9BP1F9LAEMws,15307
|
@@ -264,7 +264,7 @@ nucliadb/search/search/query_parser/models.py,sha256=7czH-jHskl9axEnZV5XnQY8cyN_
|
|
264
264
|
nucliadb/search/search/query_parser/old_filters.py,sha256=-zbfN-RsXoj_DRjh3Lfp-wShwFXgkISawzVptVzja-A,9071
|
265
265
|
nucliadb/search/search/query_parser/parsers/__init__.py,sha256=ySCNSdbesLXGZyR88919njulA6UE10_3PhqMG_Yj1o4,1034
|
266
266
|
nucliadb/search/search/query_parser/parsers/catalog.py,sha256=XdBiTweGTQkj8m_V_i2xbwp7P5pPO8K1Tud692XKhMw,7149
|
267
|
-
nucliadb/search/search/query_parser/parsers/find.py,sha256=
|
267
|
+
nucliadb/search/search/query_parser/parsers/find.py,sha256=5Hp3MIlzkf_NdzpBaNAIHS8gWm6CYZEzUMwmrrO9Z-k,4783
|
268
268
|
nucliadb/search/search/query_parser/parsers/graph.py,sha256=QJs-pybNXPsMSEkIHctb0Q0xQG-aArks8BtUxbJL5rU,9386
|
269
269
|
nucliadb/standalone/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
270
270
|
nucliadb/standalone/api_router.py,sha256=hgq9FXpihzgjHkwcVGfGCSwyXy67fqXTfLFHuINzIi0,5567
|
@@ -361,8 +361,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
361
361
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
362
362
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
363
363
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
364
|
-
nucliadb-6.3.5.
|
365
|
-
nucliadb-6.3.5.
|
366
|
-
nucliadb-6.3.5.
|
367
|
-
nucliadb-6.3.5.
|
368
|
-
nucliadb-6.3.5.
|
364
|
+
nucliadb-6.3.5.post4041.dist-info/METADATA,sha256=GxFn38Bmq7__eS-pfLBQ8sJTLFIoeyhqKm6JWiJJsDU,4301
|
365
|
+
nucliadb-6.3.5.post4041.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
366
|
+
nucliadb-6.3.5.post4041.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
367
|
+
nucliadb-6.3.5.post4041.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
368
|
+
nucliadb-6.3.5.post4041.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|