fix: update PresidioAnalyzeRequest type to support Union entities
This commit is contained in:
parent
471f011ae5
commit
cb14bb341d
@ -173,7 +173,7 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail):
|
||||
analyze_payload["ad_hoc_recognizers"] = self.ad_hoc_recognizers
|
||||
|
||||
if self.pii_entities_config:
|
||||
analyze_payload["entities"] = list(self.pii_entities_config.keys()) # type: ignore
|
||||
analyze_payload["entities"] = list(self.pii_entities_config.keys())
|
||||
|
||||
##################################################################
|
||||
######### End of adding config params
|
||||
|
||||
@ -9,7 +9,7 @@ class PresidioAnalyzeRequest(TypedDict, total=False):
|
||||
text: str
|
||||
language: Optional[str]
|
||||
ad_hoc_recognizers: Optional[List[str]]
|
||||
entities: Optional[List[PiiEntityType]]
|
||||
entities: Optional[List[Union[PiiEntityType, str]]]
|
||||
|
||||
|
||||
class PresidioAnalyzeResponseItem(TypedDict, total=False):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user