enkryptai-sdk 1.0.12__tar.gz → 1.0.13__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.12/src/enkryptai_sdk.egg-info → enkryptai_sdk-1.0.13}/PKG-INFO +1 -1
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/setup.py +1 -1
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/models.py +1 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/red_team.py +1 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/models.py +2 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13/src/enkryptai_sdk.egg-info}/PKG-INFO +1 -1
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_all_v2.py +9 -4
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/LICENSE +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/README.md +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/setup.cfg +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/__init__.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/base.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/coc.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/config.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/datasets.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/deployments.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/__init__.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/base.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/coc.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/datasets.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/deployments.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/dto/guardrails.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/evals.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/guardrails.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/guardrails_old.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/red_team.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk/response.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk.egg-info/SOURCES.txt +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk.egg-info/dependency_links.txt +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/src/enkryptai_sdk.egg-info/top_level.txt +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_ai_proxy.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_all.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_basic.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_coc.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_datasets.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_deployments.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_detect_policy.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_guardrails.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_injection_attack.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_model.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_openai.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_policy_violation.py +0 -0
- {enkryptai_sdk-1.0.12 → enkryptai_sdk-1.0.13}/tests/test_redteam.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.13", # 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",
|
|
@@ -166,6 +166,7 @@ class ModelConfigDetails(BaseDTO):
|
|
|
166
166
|
auth_data: AuthData = field(default_factory=AuthData)
|
|
167
167
|
input_modalities: List[InputModality] = field(default_factory=list)
|
|
168
168
|
output_modalities: List[OutputModality] = field(default_factory=list)
|
|
169
|
+
custom_curl_command: Optional[str] = None
|
|
169
170
|
custom_headers: List[CustomHeader] = field(default_factory=list)
|
|
170
171
|
custom_payload: Dict[str, Any] = field(default_factory=dict)
|
|
171
172
|
custom_response_content_type: Optional[str] = ""
|
|
@@ -359,6 +359,7 @@ class TargetModelConfiguration(BaseDTO):
|
|
|
359
359
|
model_api_key: Optional[str] = None
|
|
360
360
|
input_modalities: List[InputModality] = field(default_factory=list)
|
|
361
361
|
output_modalities: List[OutputModality] = field(default_factory=list)
|
|
362
|
+
custom_curl_command: Optional[str] = None
|
|
362
363
|
custom_headers: List[CustomHeader] = field(default_factory=list)
|
|
363
364
|
custom_payload: Dict[str, Any] = field(default_factory=dict)
|
|
364
365
|
custom_response_content_type: Optional[str] = ""
|
|
@@ -77,6 +77,7 @@ class ModelClient(BaseClient):
|
|
|
77
77
|
"tools": config.model_config.tools,
|
|
78
78
|
"input_modalities": [m.value if hasattr(m, 'value') else m for m in config.model_config.input_modalities],
|
|
79
79
|
"output_modalities": [m.value if hasattr(m, 'value') else m for m in config.model_config.output_modalities],
|
|
80
|
+
"custom_curl_command": config.model_config.custom_curl_command,
|
|
80
81
|
"custom_headers": custom_headers,
|
|
81
82
|
"custom_payload": config.model_config.custom_payload,
|
|
82
83
|
"custom_response_content_type": config.model_config.custom_response_content_type,
|
|
@@ -225,6 +226,7 @@ class ModelClient(BaseClient):
|
|
|
225
226
|
"tools": config.model_config.tools,
|
|
226
227
|
"input_modalities": [m.value if hasattr(m, 'value') else m for m in config.model_config.input_modalities],
|
|
227
228
|
"output_modalities": [m.value if hasattr(m, 'value') else m for m in config.model_config.output_modalities],
|
|
229
|
+
"custom_curl_command": config.model_config.custom_curl_command,
|
|
228
230
|
"custom_headers": custom_headers,
|
|
229
231
|
"custom_payload": config.model_config.custom_payload,
|
|
230
232
|
"custom_response_content_type": config.model_config.custom_response_content_type,
|
|
@@ -996,7 +996,7 @@ def test_list_models(model_client):
|
|
|
996
996
|
# assert model_info["model_version"] == test_model_version
|
|
997
997
|
|
|
998
998
|
def test_get_model(model_client):
|
|
999
|
-
print("\n\nTesting get_model
|
|
999
|
+
print("\n\nTesting get_model")
|
|
1000
1000
|
# global model_saved_name
|
|
1001
1001
|
# if model_saved_name is None:
|
|
1002
1002
|
# print("\nModel saved name is None, fetching it from list_models")
|
|
@@ -1006,11 +1006,16 @@ def test_get_model(model_client):
|
|
|
1006
1006
|
# model_saved_name = model_info.model_saved_name
|
|
1007
1007
|
# assert model_saved_name is not None
|
|
1008
1008
|
# print("\nPicked model in get_model: ", model_saved_name)
|
|
1009
|
-
|
|
1009
|
+
# -------------------------------
|
|
1010
|
+
# NOTE: Using custom model here is breaking AI Proxy as model_saved_name is a global variable
|
|
1011
|
+
# -------------------------------
|
|
1012
|
+
# model_saved_name = test_custom_model_saved_name
|
|
1013
|
+
model_saved_name = test_model_saved_name
|
|
1010
1014
|
model_version = test_model_version
|
|
1011
1015
|
|
|
1012
1016
|
# Now test the get_model method
|
|
1013
1017
|
model = model_client.get_model(model_saved_name=model_saved_name, model_version=model_version)
|
|
1018
|
+
# print("\nGET Model: ", model)
|
|
1014
1019
|
assert model is not None
|
|
1015
1020
|
# assert hasattr(model, "model_id")
|
|
1016
1021
|
assert model.model_saved_name == model_saved_name
|
|
@@ -1040,7 +1045,7 @@ def test_modify_model(model_client, sample_custom_model_config):
|
|
|
1040
1045
|
# Tests for Deployment Endpoints
|
|
1041
1046
|
# ----------------------------
|
|
1042
1047
|
|
|
1043
|
-
def
|
|
1048
|
+
def test_add_deployment(deployment_client, sample_deployment_config):
|
|
1044
1049
|
response = deployment_client.add_deployment(config=sample_deployment_config)
|
|
1045
1050
|
assert response is not None
|
|
1046
1051
|
assert hasattr(response, "from_dict")
|
|
@@ -1131,7 +1136,7 @@ def test_401_err_chat(ai_proxy_err_client, sample_chat_body):
|
|
|
1131
1136
|
# Tests for Dataset Endpoints
|
|
1132
1137
|
# ----------------------------
|
|
1133
1138
|
|
|
1134
|
-
def
|
|
1139
|
+
def test_add_dataset(dataset_client, sample_dataset_config):
|
|
1135
1140
|
print("\n\nTesting add_dataset")
|
|
1136
1141
|
response = dataset_client.add_dataset(config=sample_dataset_config)
|
|
1137
1142
|
print("\nAdd Dataset Response: ", response)
|
|
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.12 → enkryptai_sdk-1.0.13}/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
|