kodexa 7.0.11234515814__py3-none-any.whl → 7.0.11275546208__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.
kodexa/platform/client.py CHANGED
@@ -7094,6 +7094,7 @@ class KodexaClient:
7094
7094
  "message": MessageEndpoint,
7095
7095
  "prompt": PromptEndpoint,
7096
7096
  "guidance": GuidanceSetEndpoint,
7097
+ "retainedGuidance": RetainedGuidanceEndpoint,
7097
7098
  "channel": ChannelEndpoint,
7098
7099
  "product": ProductEndpoint,
7099
7100
  "task": TaskEndpoint,
kodexa/platform/kodexa.py CHANGED
@@ -29,7 +29,7 @@ from kodexa.model.objects import (
29
29
  DocumentFamilyEvent,
30
30
  ChannelEvent,
31
31
  DataObjectEvent,
32
- WorkspaceEvent,
32
+ WorkspaceEvent, DocumentFamily,
33
33
  )
34
34
  from kodexa.pipeline import PipelineContext, PipelineStatistics
35
35
  from kodexa.platform.client import DocumentStoreEndpoint, KodexaClient, process_response
@@ -911,16 +911,22 @@ class EventHelper:
911
911
  context={}, content_provider=self, execution_id=self.event.execution.id
912
912
  )
913
913
 
914
- if self.event.store_ref and self.event.document_family_id:
915
- logger.info("We have storeRef and document family")
916
- rds: DocumentStoreEndpoint = KodexaClient().get_object_by_ref(
917
- "store", self.event.store_ref
918
- )
919
- document_family = rds.get_family(self.event.document_family_id)
920
-
921
- context.document_family = document_family
922
- context.document_store = rds
923
-
914
+ if isinstance(self.event, DocumentFamilyEvent):
915
+ # Can we get the document family
916
+ dfe:DocumentFamilyEvent = self.event
917
+ if dfe.document_family:
918
+ logger.info(f"Setting document family for context: {dfe.document_family}")
919
+ context.document_family = dfe.document_family
920
+ logger.info(f"Getting document store for family: {context.document_family.store_ref}")
921
+ context.document_store = KodexaClient().get_object_by_ref("store", context.document_family.store_ref)
922
+ if isinstance(self.event, ContentEvent):
923
+ ce:ContentEvent = self.event
924
+ if ce.content_object:
925
+ logger.info(f"Setting content object for context: {ce.content_object}")
926
+ context.content_object = ce.content_object
927
+ logger.info(f"Getting document store for content object: {context.content_object.store_ref}")
928
+ context.document_store = KodexaClient().get_object_by_ref("store", context.content_object.store_ref)
929
+ logger.info("Returning context")
924
930
  return context
925
931
 
926
932
  def get_input_document(self, context):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.11234515814
3
+ Version: 7.0.11275546208
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -17,9 +17,9 @@ kodexa/model/persistence.py,sha256=w4WGS_qH1iowH8-ZMawZBZ2RFW3bNvmFy5fgSwr6VmQ,6
17
17
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
18
18
  kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
19
19
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
20
- kodexa/platform/client.py,sha256=JoxNouMW1BAXOdL3muzTZRBrXTppSD2Jc0mgXpwmUc4,226487
20
+ kodexa/platform/client.py,sha256=VqEx7mwspekMFkOi64aOiLozhB2t_Uk68JI64Uq8BrM,226549
21
21
  kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
22
- kodexa/platform/kodexa.py,sha256=RVtArtzn1TVhBf3NGC4xe-ZO-VEVDIC3RjLhR06p-uU,34033
22
+ kodexa/platform/kodexa.py,sha256=qWxKg4WAHCf9ZgPeFeJVIv6zkFMIgqZk8VoftHc5EeY,34709
23
23
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
24
24
  kodexa/selectors/ast.py,sha256=gG-1st841IntgBE5V7p3Cq9azaym2jV5lB_AIywQTCI,13269
25
25
  kodexa/selectors/core.py,sha256=kkt02DN20gXeaDGoGubPPeeTV7rCr4sxTyELrI0l1YU,3691
@@ -42,7 +42,7 @@ kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,
42
42
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
43
43
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
45
- kodexa-7.0.11234515814.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
- kodexa-7.0.11234515814.dist-info/METADATA,sha256=bHTXROz0GtG_dE3ugVY9HtePxsG-Z2vvosxIONxRSsA,3529
47
- kodexa-7.0.11234515814.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
- kodexa-7.0.11234515814.dist-info/RECORD,,
45
+ kodexa-7.0.11275546208.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
+ kodexa-7.0.11275546208.dist-info/METADATA,sha256=vFDQjeNzPRbs37bZjiVD8IPuGvU4WNQaI00EBTc-B_M,3529
47
+ kodexa-7.0.11275546208.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
+ kodexa-7.0.11275546208.dist-info/RECORD,,