wizit-context-ingestor 0.2.4__py3-none-any.whl → 0.2.5b1__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.
- wizit_context_ingestor/infra/aws_model.py +0 -1
- wizit_context_ingestor/infra/persistence/local_storage.py +2 -1
- wizit_context_ingestor/infra/persistence/s3_storage.py +2 -2
- wizit_context_ingestor/main.py +5 -2
- {wizit_context_ingestor-0.2.4.dist-info → wizit_context_ingestor-0.2.5b1.dist-info}/METADATA +1 -1
- {wizit_context_ingestor-0.2.4.dist-info → wizit_context_ingestor-0.2.5b1.dist-info}/RECORD +7 -7
- {wizit_context_ingestor-0.2.4.dist-info → wizit_context_ingestor-0.2.5b1.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from ...application.interfaces import PersistenceService
|
|
2
2
|
from ...domain.models import ParsedDoc
|
|
3
|
+
from typing import Optional
|
|
3
4
|
import logging
|
|
4
5
|
import os
|
|
5
6
|
logger = logging.getLogger(__name__)
|
|
@@ -40,7 +41,7 @@ class LocalStorageService(PersistenceService):
|
|
|
40
41
|
raise
|
|
41
42
|
|
|
42
43
|
|
|
43
|
-
def save_parsed_document(self, file_key: str, parsed_document: ParsedDoc):
|
|
44
|
+
def save_parsed_document(self, file_key: str, parsed_document: ParsedDoc, file_tags: Optional[dict] = {}):
|
|
44
45
|
"""Save a parsed document."""
|
|
45
46
|
with open(f"{self.tmp_folder}/{file_key}", "w", encoding="utf-8") as f:
|
|
46
47
|
f.write(parsed_document.document_text)
|
|
@@ -4,6 +4,7 @@ from boto3 import client as boto3_client
|
|
|
4
4
|
import logging
|
|
5
5
|
import os
|
|
6
6
|
from botocore.exceptions import ClientError
|
|
7
|
+
from typing import Optional
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger(__name__)
|
|
9
10
|
|
|
@@ -77,8 +78,7 @@ class S3StorageService(PersistenceService):
|
|
|
77
78
|
raise
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
def save_parsed_document(self, file_key: str, parsed_document: ParsedDoc, file_tags: dict = {}):
|
|
81
|
+
def save_parsed_document(self, file_key: str, parsed_document: ParsedDoc, file_tags: Optional[dict] = {}):
|
|
82
82
|
"""Save a parsed document to S3.
|
|
83
83
|
|
|
84
84
|
Args:
|
wizit_context_ingestor/main.py
CHANGED
|
@@ -113,8 +113,11 @@ class DeelabRedisChunksManager:
|
|
|
113
113
|
try:
|
|
114
114
|
rag_chunker = SemanticChunks(self.embeddings_model)
|
|
115
115
|
redis_embeddings_manager = RedisEmbeddingsManager(
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
self.embeddings_model,
|
|
117
|
+
self.redis_connection_string,
|
|
118
|
+
{
|
|
119
|
+
"file_key": file_key
|
|
120
|
+
}
|
|
118
121
|
)
|
|
119
122
|
local_persistence_service = LocalStorageService()
|
|
120
123
|
context_chunks_in_document_service = ContextChunksInDocumentService(
|
|
@@ -10,22 +10,22 @@ wizit_context_ingestor/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
10
10
|
wizit_context_ingestor/domain/models.py,sha256=DV83PArMyh-VoUqnVF_ohcgStsk549ixdYw98B8o2GI,381
|
|
11
11
|
wizit_context_ingestor/domain/services.py,sha256=R14ImkiDzv-X1o1qYl9J__FBclnt9Uj85xbo0wgOqCg,3407
|
|
12
12
|
wizit_context_ingestor/infra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
wizit_context_ingestor/infra/aws_model.py,sha256=
|
|
13
|
+
wizit_context_ingestor/infra/aws_model.py,sha256=glIaewSdv6PDBXoCe6QgCUIzLCjtM7KlayEERXRNFwo,2539
|
|
14
14
|
wizit_context_ingestor/infra/persistence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
wizit_context_ingestor/infra/persistence/local_storage.py,sha256=
|
|
16
|
-
wizit_context_ingestor/infra/persistence/s3_storage.py,sha256=
|
|
15
|
+
wizit_context_ingestor/infra/persistence/local_storage.py,sha256=sDFat-FMN123FUWZp_ztwoVjl0HrzChCDZmicFemy5o,1707
|
|
16
|
+
wizit_context_ingestor/infra/persistence/s3_storage.py,sha256=HYO3gWNE64ECSYYrxrIi9-2jWv1vwwGEE5QX-ZqpOCs,4791
|
|
17
17
|
wizit_context_ingestor/infra/rag/pg_embeddings.py,sha256=5m4R4GmwMU3C7AR3Je3nCdgO-2jyIaCG4QN9phGD68Q,8072
|
|
18
18
|
wizit_context_ingestor/infra/rag/redis_embeddings.py,sha256=wlgSBedq_kcrZ3SF4vGVTWM0B350kkd8C894i4mMUA8,4828
|
|
19
19
|
wizit_context_ingestor/infra/rag/semantic_chunks.py,sha256=tM6bSacBvu-VWb3VkxgQNrfskz3zFxOOAU23D2kZWD8,2255
|
|
20
20
|
wizit_context_ingestor/infra/secrets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
wizit_context_ingestor/infra/secrets/aws_secrets_manager.py,sha256=1k_R_uzLabptiZ1GXAoqAgYpk8EykXIb-pUDdidUDJQ,1202
|
|
22
22
|
wizit_context_ingestor/infra/vertex_model.py,sha256=Izpz2ZQ4Koh4PSrHAj_0iUv4Rx354SlUqqw-LrLXCOE,7256
|
|
23
|
-
wizit_context_ingestor/main.py,sha256=
|
|
23
|
+
wizit_context_ingestor/main.py,sha256=x1bieggNs3uzLkNHXZk4fBz0fYlOyff1TGvjV3Af2yM,7966
|
|
24
24
|
wizit_context_ingestor/services/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
25
25
|
wizit_context_ingestor/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
wizit_context_ingestor/services/chunks.py,sha256=tQQsdsOscZWzqVY5WxVxr3ii62FOJ3nMARaJJz6CvjQ,2011
|
|
27
27
|
wizit_context_ingestor/services/parse_doc.py,sha256=5EIQnGWSyXwepazcO4lj-MKBaBWdGzIQIwKDE1soZTc,4577
|
|
28
28
|
wizit_context_ingestor/services/pg_embeddings_manager.py,sha256=n1HOmu_Z_Z71H-rVAyJS3FdPKbBckm5W8_XethY8nuM,4998
|
|
29
|
-
wizit_context_ingestor-0.2.
|
|
30
|
-
wizit_context_ingestor-0.2.
|
|
31
|
-
wizit_context_ingestor-0.2.
|
|
29
|
+
wizit_context_ingestor-0.2.5b1.dist-info/WHEEL,sha256=F3mArEuDT3LDFEqo9fCiUx6ISLN64aIhcGSiIwtu4r8,79
|
|
30
|
+
wizit_context_ingestor-0.2.5b1.dist-info/METADATA,sha256=yMnfleIUWwt32cVfndgq8OrMC7TkJZw0gbJzN05qwfY,3577
|
|
31
|
+
wizit_context_ingestor-0.2.5b1.dist-info/RECORD,,
|
|
File without changes
|