nuclia 4.9.0__py3-none-any.whl → 4.9.1__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.
- nuclia/lib/nua_responses.py +22 -2
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/METADATA +1 -1
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/RECORD +7 -7
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/WHEEL +0 -0
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/entry_points.txt +0 -0
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/licenses/LICENSE +0 -0
- {nuclia-4.9.0.dist-info → nuclia-4.9.1.dist-info}/top_level.txt +0 -0
nuclia/lib/nua_responses.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
from datetime import datetime
|
2
|
-
from enum import Enum
|
2
|
+
from enum import Enum, IntEnum
|
3
3
|
from typing import Any, Dict, List, Optional, Union, cast
|
4
4
|
|
5
5
|
import pydantic
|
@@ -486,17 +486,37 @@ class ChatResponse(BaseModel):
|
|
486
486
|
return ChatResponse(answer=obj.decode())
|
487
487
|
|
488
488
|
|
489
|
+
class SimilarityFunction(IntEnum):
|
490
|
+
# Keep this in sync with SimilarityFunction in config.proto
|
491
|
+
# It's an IntEnum to match the protobuf definition
|
492
|
+
DOT = 0
|
493
|
+
COSINE = 1
|
494
|
+
|
495
|
+
|
496
|
+
class SemanticConfig(BaseModel):
|
497
|
+
# Keep this in sync with SemanticConfig in config.proto
|
498
|
+
similarity: SimilarityFunction
|
499
|
+
size: int
|
500
|
+
threshold: float
|
501
|
+
max_tokens: Optional[int] = None
|
502
|
+
matryoshka_dims: list[int] = []
|
503
|
+
external: bool = False
|
504
|
+
|
505
|
+
|
489
506
|
class StoredLearningConfiguration(BaseModel):
|
490
507
|
resource_labelers_models: Optional[List[str]] = None
|
491
508
|
paragraph_labelers_models: Optional[List[str]] = None
|
492
509
|
intent_models: Optional[List[str]] = None
|
493
510
|
|
511
|
+
default_semantic_model: Optional[str] = None
|
512
|
+
semantic_models: Optional[list[str]] = Field(default_factory=list[str])
|
513
|
+
semantic_model_configs: dict[str, SemanticConfig] = {}
|
494
514
|
semantic_model: str
|
495
515
|
anonymization_model: str
|
496
516
|
generative_model: str
|
497
517
|
ner_model: str
|
498
518
|
relation_model: str
|
499
|
-
visual_labeling: str
|
519
|
+
visual_labeling: Optional[str] = None
|
500
520
|
|
501
521
|
user_keys: Optional[UserLearningKeys] = None
|
502
522
|
user_prompts: Optional[UserPrompts] = None
|
@@ -13,7 +13,7 @@ nuclia/lib/kb.py,sha256=jV-L8-a5oFVHIbFfeGO17hXf2IQk9UuW-9fq5D3LO6Y,28508
|
|
13
13
|
nuclia/lib/models.py,sha256=ekEQrVIFU3aFvt60yQh-zpWkGNORBMSc7c5Hd_VzPzI,1564
|
14
14
|
nuclia/lib/nua.py,sha256=sUVFdCjvLigTqUUhILywdHpiC0qKCtKPABn5kUXfuxQ,27064
|
15
15
|
nuclia/lib/nua_chat.py,sha256=ApL1Y1FWvAVUt-Y9a_8TUSJIhg8-UmBSy8TlDPn6tD8,3874
|
16
|
-
nuclia/lib/nua_responses.py,sha256=
|
16
|
+
nuclia/lib/nua_responses.py,sha256=RJB7bbgZEpYr29aOmaT2nb1X0g6wds4MOngq7N-ZcTg,13382
|
17
17
|
nuclia/lib/utils.py,sha256=9l6DxBk-11WqUhXRn99cqeuVTUOJXj-1S6zckal7wOk,6312
|
18
18
|
nuclia/sdk/__init__.py,sha256=-nAw8i53XBdmbfTa1FJZ0FNRMNakimDVpD6W4OdES-c,1374
|
19
19
|
nuclia/sdk/accounts.py,sha256=7XQ3K9_jlSuk2Cez868FtazZ05xSGab6h3Mt1qMMwIE,647
|
@@ -61,9 +61,9 @@ nuclia/tests/test_nucliadb/test_crud.py,sha256=GuY76HRvt2DFaNgioKm5n0Aco1HnG7zzV
|
|
61
61
|
nuclia/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
62
|
nuclia/tests/unit/test_export_import.py,sha256=xo_wVbjUnNlVV65ZGH7LtZ38qy39EkJp2hjOuTHC1nU,980
|
63
63
|
nuclia/tests/unit/test_nua_responses.py,sha256=t_hIdVztTi27RWvpfTJUYcCL0lpKdZFegZIwLdaPNh8,319
|
64
|
-
nuclia-4.9.
|
65
|
-
nuclia-4.9.
|
66
|
-
nuclia-4.9.
|
67
|
-
nuclia-4.9.
|
68
|
-
nuclia-4.9.
|
69
|
-
nuclia-4.9.
|
64
|
+
nuclia-4.9.1.dist-info/licenses/LICENSE,sha256=Ops2LTti_HJtpmWcanuUTdTY3vKDR1myJ0gmGBKC0FA,1063
|
65
|
+
nuclia-4.9.1.dist-info/METADATA,sha256=bScM2QXDcmlYLGp0pDG1ij02jclIV8u0Rk_CTFwkjvA,2337
|
66
|
+
nuclia-4.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
67
|
+
nuclia-4.9.1.dist-info/entry_points.txt,sha256=iZHOyXPNS54r3eQmdi5So20xO1gudI9K2oP4sQsCJRw,46
|
68
|
+
nuclia-4.9.1.dist-info/top_level.txt,sha256=cqn_EitXOoXOSUvZnd4q6QGrhm04pg8tLAZtem-Zfdo,7
|
69
|
+
nuclia-4.9.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|