enkryptai-sdk 1.0.13__tar.gz → 1.0.14__tar.gz
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.
- {enkryptai_sdk-1.0.13/src/enkryptai_sdk.egg-info → enkryptai_sdk-1.0.14}/PKG-INFO +11 -12
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/README.md +10 -11
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/setup.py +1 -1
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/models.py +1 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14/src/enkryptai_sdk.egg-info}/PKG-INFO +11 -12
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/LICENSE +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/setup.cfg +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/__init__.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/base.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/coc.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/config.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/datasets.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/deployments.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/__init__.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/base.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/coc.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/datasets.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/deployments.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/guardrails.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/dto/red_team.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/evals.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/guardrails.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/guardrails_old.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/models.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/red_team.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk/response.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk.egg-info/SOURCES.txt +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk.egg-info/dependency_links.txt +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk.egg-info/top_level.txt +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_all.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_all_v2.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_basic.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_coc.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_datasets.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_deployments.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_detect_policy.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_guardrails.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_injection_attack.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_model.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_openai.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_policy_violation.py +0 -0
- {enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/tests/test_redteam.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: enkryptai-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: A Python SDK with guardrails and red teaming functionality for API interactions
|
|
5
5
|
Home-page: https://github.com/enkryptai/enkryptai-sdk
|
|
6
6
|
Author: Enkrypt AI Team
|
|
@@ -271,14 +271,7 @@ sample_detectors = {
|
|
|
271
271
|
},
|
|
272
272
|
"bias": {
|
|
273
273
|
"enabled": False
|
|
274
|
-
}
|
|
275
|
-
"copyright_ip": {
|
|
276
|
-
"enabled": False
|
|
277
|
-
},
|
|
278
|
-
"system_prompt": {
|
|
279
|
-
"enabled": False,
|
|
280
|
-
"index": "system"
|
|
281
|
-
},
|
|
274
|
+
}
|
|
282
275
|
}
|
|
283
276
|
```
|
|
284
277
|
|
|
@@ -701,8 +694,8 @@ print(batch_detect_response.to_dict())
|
|
|
701
694
|
- `nsfw`: Filter inappropriate content
|
|
702
695
|
- `toxicity`: Detect toxic language
|
|
703
696
|
- `pii`: Detect personal information
|
|
704
|
-
- `copyright_ip`: Check for copyright/IP violations
|
|
705
|
-
- `system_prompt`: Detect system prompt leaks
|
|
697
|
+
- `copyright_ip`: Check for copyright/IP violations *(Coming soon)*
|
|
698
|
+
- `system_prompt`: Detect system prompt leaks *(Coming soon)*
|
|
706
699
|
- `keyword_detector`: Check for specific keywords
|
|
707
700
|
|
|
708
701
|
Each detector can be enabled/disabled and configured with specific options as documented in the [API docs](https://docs.enkryptai.com/guardrails-api-reference/introduction).
|
|
@@ -764,12 +757,16 @@ guardrails_config = GuardrailsConfig.keyword(keywords=["secret", "password"])
|
|
|
764
757
|
|
|
765
758
|
### [Copyright IP](https://docs.enkryptai.com/guardrails-api-reference/Copyright_IP_Leak_Detector)
|
|
766
759
|
|
|
760
|
+
*(Coming soon)*
|
|
761
|
+
|
|
767
762
|
```python Python
|
|
768
763
|
guardrails_config = GuardrailsConfig.copyright_ip()
|
|
769
764
|
```
|
|
770
765
|
|
|
771
766
|
### [System Prompt](https://docs.enkryptai.com/guardrails-api-reference/System_Prompt_Leak_Detector)
|
|
772
767
|
|
|
768
|
+
*(Coming soon)*
|
|
769
|
+
|
|
773
770
|
```python Python
|
|
774
771
|
guardrails_config = GuardrailsConfig.system_prompt(index="system")
|
|
775
772
|
```
|
|
@@ -972,6 +969,8 @@ print(relevancy_response.to_dict())
|
|
|
972
969
|
|
|
973
970
|
### [Check Hallucination](https://docs.enkryptai.com/guardrails-api-reference/Hallucination)
|
|
974
971
|
|
|
972
|
+
*(Coming soon)*
|
|
973
|
+
|
|
975
974
|
Detect hallucinations in an LLM's response:
|
|
976
975
|
|
|
977
976
|
```python Python
|
|
@@ -1057,7 +1056,7 @@ print(atomize_response.to_dict())
|
|
|
1057
1056
|
# Add a code of conduct policy
|
|
1058
1057
|
add_policy_response = coc_client.add_policy(
|
|
1059
1058
|
policy_name=test_coc_policy_name,
|
|
1060
|
-
policy_rules=example_coc_policy_rules,
|
|
1059
|
+
policy_rules=example_coc_policy_rules, # Can also be a list of rules
|
|
1061
1060
|
total_rules=4,
|
|
1062
1061
|
policy_file="/path/to/your/policy.pdf"
|
|
1063
1062
|
# policy_text=example_coc_policy_text, # Optional: Use this if you want to add a policy text instead of a file
|
|
@@ -248,14 +248,7 @@ sample_detectors = {
|
|
|
248
248
|
},
|
|
249
249
|
"bias": {
|
|
250
250
|
"enabled": False
|
|
251
|
-
}
|
|
252
|
-
"copyright_ip": {
|
|
253
|
-
"enabled": False
|
|
254
|
-
},
|
|
255
|
-
"system_prompt": {
|
|
256
|
-
"enabled": False,
|
|
257
|
-
"index": "system"
|
|
258
|
-
},
|
|
251
|
+
}
|
|
259
252
|
}
|
|
260
253
|
```
|
|
261
254
|
|
|
@@ -678,8 +671,8 @@ print(batch_detect_response.to_dict())
|
|
|
678
671
|
- `nsfw`: Filter inappropriate content
|
|
679
672
|
- `toxicity`: Detect toxic language
|
|
680
673
|
- `pii`: Detect personal information
|
|
681
|
-
- `copyright_ip`: Check for copyright/IP violations
|
|
682
|
-
- `system_prompt`: Detect system prompt leaks
|
|
674
|
+
- `copyright_ip`: Check for copyright/IP violations *(Coming soon)*
|
|
675
|
+
- `system_prompt`: Detect system prompt leaks *(Coming soon)*
|
|
683
676
|
- `keyword_detector`: Check for specific keywords
|
|
684
677
|
|
|
685
678
|
Each detector can be enabled/disabled and configured with specific options as documented in the [API docs](https://docs.enkryptai.com/guardrails-api-reference/introduction).
|
|
@@ -741,12 +734,16 @@ guardrails_config = GuardrailsConfig.keyword(keywords=["secret", "password"])
|
|
|
741
734
|
|
|
742
735
|
### [Copyright IP](https://docs.enkryptai.com/guardrails-api-reference/Copyright_IP_Leak_Detector)
|
|
743
736
|
|
|
737
|
+
*(Coming soon)*
|
|
738
|
+
|
|
744
739
|
```python Python
|
|
745
740
|
guardrails_config = GuardrailsConfig.copyright_ip()
|
|
746
741
|
```
|
|
747
742
|
|
|
748
743
|
### [System Prompt](https://docs.enkryptai.com/guardrails-api-reference/System_Prompt_Leak_Detector)
|
|
749
744
|
|
|
745
|
+
*(Coming soon)*
|
|
746
|
+
|
|
750
747
|
```python Python
|
|
751
748
|
guardrails_config = GuardrailsConfig.system_prompt(index="system")
|
|
752
749
|
```
|
|
@@ -949,6 +946,8 @@ print(relevancy_response.to_dict())
|
|
|
949
946
|
|
|
950
947
|
### [Check Hallucination](https://docs.enkryptai.com/guardrails-api-reference/Hallucination)
|
|
951
948
|
|
|
949
|
+
*(Coming soon)*
|
|
950
|
+
|
|
952
951
|
Detect hallucinations in an LLM's response:
|
|
953
952
|
|
|
954
953
|
```python Python
|
|
@@ -1034,7 +1033,7 @@ print(atomize_response.to_dict())
|
|
|
1034
1033
|
# Add a code of conduct policy
|
|
1035
1034
|
add_policy_response = coc_client.add_policy(
|
|
1036
1035
|
policy_name=test_coc_policy_name,
|
|
1037
|
-
policy_rules=example_coc_policy_rules,
|
|
1036
|
+
policy_rules=example_coc_policy_rules, # Can also be a list of rules
|
|
1038
1037
|
total_rules=4,
|
|
1039
1038
|
policy_file="/path/to/your/policy.pdf"
|
|
1040
1039
|
# policy_text=example_coc_policy_text, # Optional: Use this if you want to add a policy text instead of a file
|
|
@@ -9,7 +9,7 @@ with open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
|
|
|
9
9
|
setup(
|
|
10
10
|
name="enkryptai-sdk", # This is the name of your package on PyPI
|
|
11
11
|
# NOTE: Also change this in .github/workflows/test.yaml
|
|
12
|
-
version="1.0.
|
|
12
|
+
version="1.0.14", # Update this for new versions
|
|
13
13
|
description="A Python SDK with guardrails and red teaming functionality for API interactions",
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: enkryptai-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: A Python SDK with guardrails and red teaming functionality for API interactions
|
|
5
5
|
Home-page: https://github.com/enkryptai/enkryptai-sdk
|
|
6
6
|
Author: Enkrypt AI Team
|
|
@@ -271,14 +271,7 @@ sample_detectors = {
|
|
|
271
271
|
},
|
|
272
272
|
"bias": {
|
|
273
273
|
"enabled": False
|
|
274
|
-
}
|
|
275
|
-
"copyright_ip": {
|
|
276
|
-
"enabled": False
|
|
277
|
-
},
|
|
278
|
-
"system_prompt": {
|
|
279
|
-
"enabled": False,
|
|
280
|
-
"index": "system"
|
|
281
|
-
},
|
|
274
|
+
}
|
|
282
275
|
}
|
|
283
276
|
```
|
|
284
277
|
|
|
@@ -701,8 +694,8 @@ print(batch_detect_response.to_dict())
|
|
|
701
694
|
- `nsfw`: Filter inappropriate content
|
|
702
695
|
- `toxicity`: Detect toxic language
|
|
703
696
|
- `pii`: Detect personal information
|
|
704
|
-
- `copyright_ip`: Check for copyright/IP violations
|
|
705
|
-
- `system_prompt`: Detect system prompt leaks
|
|
697
|
+
- `copyright_ip`: Check for copyright/IP violations *(Coming soon)*
|
|
698
|
+
- `system_prompt`: Detect system prompt leaks *(Coming soon)*
|
|
706
699
|
- `keyword_detector`: Check for specific keywords
|
|
707
700
|
|
|
708
701
|
Each detector can be enabled/disabled and configured with specific options as documented in the [API docs](https://docs.enkryptai.com/guardrails-api-reference/introduction).
|
|
@@ -764,12 +757,16 @@ guardrails_config = GuardrailsConfig.keyword(keywords=["secret", "password"])
|
|
|
764
757
|
|
|
765
758
|
### [Copyright IP](https://docs.enkryptai.com/guardrails-api-reference/Copyright_IP_Leak_Detector)
|
|
766
759
|
|
|
760
|
+
*(Coming soon)*
|
|
761
|
+
|
|
767
762
|
```python Python
|
|
768
763
|
guardrails_config = GuardrailsConfig.copyright_ip()
|
|
769
764
|
```
|
|
770
765
|
|
|
771
766
|
### [System Prompt](https://docs.enkryptai.com/guardrails-api-reference/System_Prompt_Leak_Detector)
|
|
772
767
|
|
|
768
|
+
*(Coming soon)*
|
|
769
|
+
|
|
773
770
|
```python Python
|
|
774
771
|
guardrails_config = GuardrailsConfig.system_prompt(index="system")
|
|
775
772
|
```
|
|
@@ -972,6 +969,8 @@ print(relevancy_response.to_dict())
|
|
|
972
969
|
|
|
973
970
|
### [Check Hallucination](https://docs.enkryptai.com/guardrails-api-reference/Hallucination)
|
|
974
971
|
|
|
972
|
+
*(Coming soon)*
|
|
973
|
+
|
|
975
974
|
Detect hallucinations in an LLM's response:
|
|
976
975
|
|
|
977
976
|
```python Python
|
|
@@ -1057,7 +1056,7 @@ print(atomize_response.to_dict())
|
|
|
1057
1056
|
# Add a code of conduct policy
|
|
1058
1057
|
add_policy_response = coc_client.add_policy(
|
|
1059
1058
|
policy_name=test_coc_policy_name,
|
|
1060
|
-
policy_rules=example_coc_policy_rules,
|
|
1059
|
+
policy_rules=example_coc_policy_rules, # Can also be a list of rules
|
|
1061
1060
|
total_rules=4,
|
|
1062
1061
|
policy_file="/path/to/your/policy.pdf"
|
|
1063
1062
|
# policy_text=example_coc_policy_text, # Optional: Use this if you want to add a policy text instead of a file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{enkryptai_sdk-1.0.13 → enkryptai_sdk-1.0.14}/src/enkryptai_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|