enkryptai-sdk 1.0.23__tar.gz → 1.0.24__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.23 → enkryptai_sdk-1.0.24}/PKG-INFO +1 -1
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/setup.py +1 -1
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/red_team.py +1 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk.egg-info/PKG-INFO +1 -1
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_redteam.py +55 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/LICENSE +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/README.md +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/setup.cfg +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/__init__.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/base.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/coc.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/config.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/datasets.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/deployments.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/__init__.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/base.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/coc.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/common.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/datasets.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/deployments.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/guardrails.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/dto/models.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/evals.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/guardrails.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/guardrails_old.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/models.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/red_team.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk/response.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk.egg-info/SOURCES.txt +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk.egg-info/dependency_links.txt +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/src/enkryptai_sdk.egg-info/top_level.txt +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_all.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_all_v2.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_basic.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_coc.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_datasets.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_deployments.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_detect_policy.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_guardrails.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_injection_attack.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_model.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_openai.py +0 -0
- {enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/tests/test_policy_violation.py +0 -0
|
@@ -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.24", # 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",
|
|
@@ -391,6 +391,7 @@ class RedTeamTestConfigurations(BaseDTO):
|
|
|
391
391
|
# Basic tests
|
|
392
392
|
bias_test: TestConfig = field(default=None)
|
|
393
393
|
cbrn_test: TestConfig = field(default=None)
|
|
394
|
+
csem_test: TestConfig = field(default=None)
|
|
394
395
|
insecure_code_test: TestConfig = field(default=None)
|
|
395
396
|
toxicity_test: TestConfig = field(default=None)
|
|
396
397
|
harmful_test: TestConfig = field(default=None)
|
|
@@ -132,6 +132,61 @@ def test_add_custom_task_with_saved_model(redteam_client, sample_custom_redteam_
|
|
|
132
132
|
time.sleep(60)
|
|
133
133
|
|
|
134
134
|
|
|
135
|
+
# def test_add_custom_task_with_saved_model_2(redteam_client, sample_custom_redteam_model_config):
|
|
136
|
+
# print("\n\nTesting adding a new custom redteam task with saved model (2)")
|
|
137
|
+
# response = redteam_client.add_custom_task_with_saved_model(config=sample_custom_redteam_model_config, model_saved_name=test_model_saved_name, model_version=test_model_version)
|
|
138
|
+
# print("\nResponse from adding a new custom redteam task with saved model (2): ", response)
|
|
139
|
+
# assert response is not None
|
|
140
|
+
# assert hasattr(response, "task_id")
|
|
141
|
+
# assert hasattr(response, "message")
|
|
142
|
+
# response.message == "Task submitted successfully"
|
|
143
|
+
# # Sleep for a while to let the task complete
|
|
144
|
+
# # This is also useful to avoid rate limiting issues
|
|
145
|
+
# # print("\nSleeping for 60 seconds to let the (2) task complete if possible ...")
|
|
146
|
+
# # time.sleep(60)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# def test_add_custom_task_with_saved_model_3(redteam_client, sample_custom_redteam_model_config):
|
|
150
|
+
# print("\n\nTesting adding a new custom redteam task with saved model (3)")
|
|
151
|
+
# response = redteam_client.add_custom_task_with_saved_model(config=sample_custom_redteam_model_config, model_saved_name=test_model_saved_name, model_version=test_model_version)
|
|
152
|
+
# print("\nResponse from adding a new custom redteam task with saved model (3): ", response)
|
|
153
|
+
# assert response is not None
|
|
154
|
+
# assert hasattr(response, "task_id")
|
|
155
|
+
# assert hasattr(response, "message")
|
|
156
|
+
# response.message == "Task submitted successfully"
|
|
157
|
+
# # Sleep for a while to let the task complete
|
|
158
|
+
# # This is also useful to avoid rate limiting issues
|
|
159
|
+
# # print("\nSleeping for 60 seconds to let the (3) task complete if possible ...")
|
|
160
|
+
# # time.sleep(60)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# def test_add_custom_task_with_saved_model_4(redteam_client, sample_custom_redteam_model_config):
|
|
164
|
+
# print("\n\nTesting adding a new custom redteam task with saved model (4)")
|
|
165
|
+
# response = redteam_client.add_custom_task_with_saved_model(config=sample_custom_redteam_model_config, model_saved_name=test_model_saved_name, model_version=test_model_version)
|
|
166
|
+
# print("\nResponse from adding a new custom redteam task with saved model (4): ", response)
|
|
167
|
+
# assert response is not None
|
|
168
|
+
# assert hasattr(response, "task_id")
|
|
169
|
+
# assert hasattr(response, "message")
|
|
170
|
+
# response.message == "Task submitted successfully"
|
|
171
|
+
# # Sleep for a while to let the task complete
|
|
172
|
+
# # This is also useful to avoid rate limiting issues
|
|
173
|
+
# # print("\nSleeping for 60 seconds to let the (4) task complete if possible ...")
|
|
174
|
+
# # time.sleep(60)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
# def test_add_custom_task_with_saved_model_5(redteam_client, sample_custom_redteam_model_config):
|
|
178
|
+
# print("\n\nTesting adding a new custom redteam task with saved model (5)")
|
|
179
|
+
# response = redteam_client.add_custom_task_with_saved_model(config=sample_custom_redteam_model_config, model_saved_name=test_model_saved_name, model_version=test_model_version)
|
|
180
|
+
# print("\nResponse from adding a new custom redteam task with saved model (5): ", response)
|
|
181
|
+
# assert response is not None
|
|
182
|
+
# assert hasattr(response, "task_id")
|
|
183
|
+
# assert hasattr(response, "message")
|
|
184
|
+
# response.message == "Task submitted successfully"
|
|
185
|
+
# # Sleep for a while to let the task complete
|
|
186
|
+
# # This is also useful to avoid rate limiting issues
|
|
187
|
+
# # print("\nSleeping for 60 seconds to let the (5) task complete if possible ...")
|
|
188
|
+
# # time.sleep(60)
|
|
189
|
+
|
|
135
190
|
def test_list_redteams(redteam_client):
|
|
136
191
|
print("\n\nTesting list_redteam tasks")
|
|
137
192
|
redteams = redteam_client.get_task_list(status="Finished")
|
|
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
|
|
File without changes
|
|
File without changes
|
{enkryptai_sdk-1.0.23 → enkryptai_sdk-1.0.24}/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
|