mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-20 02:28:39 +00:00
fix: update PresidioAnalyzeRequest type to support Union entities
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user