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.
@@ -37,7 +37,6 @@ class AWSModels(AiApplicationService):
37
37
  temperature: float = 0.7,
38
38
  max_tokens: int = 8000,
39
39
  region_name: str = "us-east-1") -> ChatBedrockConverse:
40
-
41
40
  """
42
41
  Load an AWS AI chat model for text generation.
43
42
 
@@ -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:
@@ -113,8 +113,11 @@ class DeelabRedisChunksManager:
113
113
  try:
114
114
  rag_chunker = SemanticChunks(self.embeddings_model)
115
115
  redis_embeddings_manager = RedisEmbeddingsManager(
116
- embeddings_model=self.embeddings_model,
117
- redis_connection_string=self.redis_connection_string
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(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wizit-context-ingestor
3
- Version: 0.2.4
3
+ Version: 0.2.5b1
4
4
  Summary: Contextual Rag with Cloud Solutions
5
5
  Requires-Dist: anthropic[vertex]>=0.66.0
6
6
  Requires-Dist: boto3>=1.40.23
@@ -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=P0iQKYjERGV38Lc1WtBnZtVmKiHkktwUb4G4dqJz6-s,2540
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=Spw-Zmwj2OTY-TU9WokvNinnu1D5R87SpUV0S7MJZN8,1647
16
- wizit_context_ingestor/infra/persistence/s3_storage.py,sha256=c39pMpkoFtfFXzRFxVgHzKVsT3IoJzBsCe6-CydAQXM,4754
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=8pTXFqLHrs02YxhHaNm9v49HIykilhefkonJxKkBsT4,7929
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.4.dist-info/WHEEL,sha256=F3mArEuDT3LDFEqo9fCiUx6ISLN64aIhcGSiIwtu4r8,79
30
- wizit_context_ingestor-0.2.4.dist-info/METADATA,sha256=-vIELbGOA3J_qLY0iJyz4GXH5UyB4WBmUNL4tJjUKHI,3575
31
- wizit_context_ingestor-0.2.4.dist-info/RECORD,,
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,,