nucliadb-utils 5.0.1.post1135__py3-none-any.whl → 5.0.1.post1141__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_utils/audit/audit.py +3 -6
- nucliadb_utils/audit/basic.py +3 -6
- nucliadb_utils/audit/stream.py +5 -8
- {nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/METADATA +3 -3
- {nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/RECORD +8 -8
- {nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/WHEEL +1 -1
- {nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/zip-safe +0 -0
nucliadb_utils/audit/audit.py
CHANGED
@@ -21,11 +21,7 @@ from typing import List, Optional
|
|
21
21
|
|
22
22
|
from google.protobuf.timestamp_pb2 import Timestamp
|
23
23
|
|
24
|
-
from nucliadb_protos.audit_pb2 import
|
25
|
-
AuditField,
|
26
|
-
AuditRequest,
|
27
|
-
ChatContext,
|
28
|
-
)
|
24
|
+
from nucliadb_protos.audit_pb2 import AuditField, AuditRequest, ChatContext, RetrievedContext
|
29
25
|
from nucliadb_protos.nodereader_pb2 import SearchRequest
|
30
26
|
from nucliadb_protos.resources_pb2 import FieldID
|
31
27
|
|
@@ -85,7 +81,8 @@ class AuditStorage:
|
|
85
81
|
origin: str,
|
86
82
|
question: str,
|
87
83
|
rephrased_question: Optional[str],
|
88
|
-
|
84
|
+
chat_context: List[ChatContext],
|
85
|
+
retrieved_context: List[RetrievedContext],
|
89
86
|
answer: Optional[str],
|
90
87
|
learning_id: str,
|
91
88
|
rephrase_time: Optional[float] = None,
|
nucliadb_utils/audit/basic.py
CHANGED
@@ -21,11 +21,7 @@ from typing import List, Optional
|
|
21
21
|
|
22
22
|
from google.protobuf.timestamp_pb2 import Timestamp
|
23
23
|
|
24
|
-
from nucliadb_protos.audit_pb2 import
|
25
|
-
AuditField,
|
26
|
-
AuditRequest,
|
27
|
-
ChatContext,
|
28
|
-
)
|
24
|
+
from nucliadb_protos.audit_pb2 import AuditField, AuditRequest, ChatContext, RetrievedContext
|
29
25
|
from nucliadb_protos.nodereader_pb2 import SearchRequest
|
30
26
|
from nucliadb_protos.resources_pb2 import FieldID
|
31
27
|
from nucliadb_protos.writer_pb2 import BrokerMessage
|
@@ -86,7 +82,8 @@ class BasicAuditStorage(AuditStorage):
|
|
86
82
|
origin: str,
|
87
83
|
question: str,
|
88
84
|
rephrased_question: Optional[str],
|
89
|
-
|
85
|
+
chat_context: List[ChatContext],
|
86
|
+
retrieved_context: List[RetrievedContext],
|
90
87
|
answer: Optional[str],
|
91
88
|
learning_id: str,
|
92
89
|
rephrase_time: Optional[float] = None,
|
nucliadb_utils/audit/stream.py
CHANGED
@@ -33,12 +33,7 @@ from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoin
|
|
33
33
|
from starlette.responses import Response, StreamingResponse
|
34
34
|
from starlette.types import ASGIApp
|
35
35
|
|
36
|
-
from nucliadb_protos.audit_pb2 import
|
37
|
-
AuditField,
|
38
|
-
AuditRequest,
|
39
|
-
ChatContext,
|
40
|
-
ClientType,
|
41
|
-
)
|
36
|
+
from nucliadb_protos.audit_pb2 import AuditField, AuditRequest, ChatContext, ClientType, RetrievedContext
|
42
37
|
from nucliadb_protos.nodereader_pb2 import SearchRequest
|
43
38
|
from nucliadb_protos.resources_pb2 import FieldID
|
44
39
|
from nucliadb_utils import logger
|
@@ -380,7 +375,8 @@ class StreamAuditStorage(AuditStorage):
|
|
380
375
|
origin: str,
|
381
376
|
question: str,
|
382
377
|
rephrased_question: Optional[str],
|
383
|
-
|
378
|
+
chat_context: List[ChatContext],
|
379
|
+
retrieved_context: List[RetrievedContext],
|
384
380
|
answer: Optional[str],
|
385
381
|
learning_id: str,
|
386
382
|
rephrase_time: Optional[float] = None,
|
@@ -405,7 +401,8 @@ class StreamAuditStorage(AuditStorage):
|
|
405
401
|
auditrequest.generative_answer_first_chunk_time = generative_answer_first_chunk_time
|
406
402
|
auditrequest.type = AuditRequest.CHAT
|
407
403
|
auditrequest.chat.question = question
|
408
|
-
auditrequest.chat.
|
404
|
+
auditrequest.chat.chat_context.extend(chat_context)
|
405
|
+
auditrequest.chat.retrieved_context.extend(retrieved_context)
|
409
406
|
auditrequest.chat.learning_id = learning_id
|
410
407
|
if rephrased_question is not None:
|
411
408
|
auditrequest.chat.rephrased_question = rephrased_question
|
{nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb_utils
|
3
|
-
Version: 5.0.1.
|
3
|
+
Version: 5.0.1.post1141
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -24,8 +24,8 @@ Requires-Dist: PyNaCl
|
|
24
24
|
Requires-Dist: pyjwt>=2.4.0
|
25
25
|
Requires-Dist: memorylru>=1.1.2
|
26
26
|
Requires-Dist: mrflagly>=0.2.9
|
27
|
-
Requires-Dist: nucliadb-protos>=5.0.1.
|
28
|
-
Requires-Dist: nucliadb-telemetry>=5.0.1.
|
27
|
+
Requires-Dist: nucliadb-protos>=5.0.1.post1141
|
28
|
+
Requires-Dist: nucliadb-telemetry>=5.0.1.post1141
|
29
29
|
Provides-Extra: cache
|
30
30
|
Requires-Dist: redis>=4.3.4; extra == "cache"
|
31
31
|
Requires-Dist: orjson>=3.6.7; extra == "cache"
|
@@ -22,9 +22,9 @@ nucliadb_utils/aiopynecone/client.py,sha256=3DGJuHXO9Vm83atMLD4fd2FTz8SAr8RvPCGU
|
|
22
22
|
nucliadb_utils/aiopynecone/exceptions.py,sha256=yfUXIADRuhPb2rNynoFRlpQ6QINm1EkmvT_BbZ7dv8I,3536
|
23
23
|
nucliadb_utils/aiopynecone/models.py,sha256=ketK2IYLWiwFZ76rnJmwfcuopFJrCAtCUszdTSurm_Q,3236
|
24
24
|
nucliadb_utils/audit/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
25
|
-
nucliadb_utils/audit/audit.py,sha256=
|
26
|
-
nucliadb_utils/audit/basic.py,sha256=
|
27
|
-
nucliadb_utils/audit/stream.py,sha256=
|
25
|
+
nucliadb_utils/audit/audit.py,sha256=0RoJxK_SesKD9cbNMqCtpT4ylznFxEcHsetyh1eRlEk,3023
|
26
|
+
nucliadb_utils/audit/basic.py,sha256=g-790vVvua6OrUkHGBjvgz2TaZt21dWoZw3XiYptt_E,3634
|
27
|
+
nucliadb_utils/audit/stream.py,sha256=mHZD-iX5t7N5dd6BS4j0XUkQ8G6rmBXub6GngfIOcx0,13805
|
28
28
|
nucliadb_utils/cache/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
|
29
29
|
nucliadb_utils/cache/exceptions.py,sha256=Zu-O_-0-yctOEgoDGI92gPzWfBMRrpiAyESA62ld6MA,975
|
30
30
|
nucliadb_utils/cache/nats.py,sha256=-AjCfkFgKVdJUlGR0hT9JDSNkPVFg4S6w9eW-ZIcXPM,7037
|
@@ -64,8 +64,8 @@ nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQ
|
|
64
64
|
nucliadb_utils/tests/local.py,sha256=7nuP8EFUAiA8ZH50R1iPV9EUXBySQxOanVm3Zht_e0g,1835
|
65
65
|
nucliadb_utils/tests/nats.py,sha256=xqpww4jZjTKY9oPGlJdDJG67L3FIBQsa9qDHxILR8r8,7687
|
66
66
|
nucliadb_utils/tests/s3.py,sha256=IdMxK_cNdSHLvO1u8BwsKFzD87Hk1MVPDZ57zx6h-rA,3656
|
67
|
-
nucliadb_utils-5.0.1.
|
68
|
-
nucliadb_utils-5.0.1.
|
69
|
-
nucliadb_utils-5.0.1.
|
70
|
-
nucliadb_utils-5.0.1.
|
71
|
-
nucliadb_utils-5.0.1.
|
67
|
+
nucliadb_utils-5.0.1.post1141.dist-info/METADATA,sha256=K-62J0W9ahmctvyty7ELeoJ39F39lwtkZje7odWeREg,2071
|
68
|
+
nucliadb_utils-5.0.1.post1141.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
|
69
|
+
nucliadb_utils-5.0.1.post1141.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
70
|
+
nucliadb_utils-5.0.1.post1141.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
71
|
+
nucliadb_utils-5.0.1.post1141.dist-info/RECORD,,
|
{nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-5.0.1.post1135.dist-info → nucliadb_utils-5.0.1.post1141.dist-info}/zip-safe
RENAMED
File without changes
|