swiftapi-python 1.2.1__tar.gz → 1.2.2__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.
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/PKG-INFO +1 -1
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/pyproject.toml +1 -1
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/__init__.py +1 -1
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/client.py +5 -3
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.egg-info/PKG-INFO +1 -1
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/LICENSE +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/README.md +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/setup.cfg +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/anthropic.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/enforcement.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/exceptions.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/openai.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/utils.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi/verifier.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.egg-info/SOURCES.txt +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.egg-info/dependency_links.txt +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.egg-info/requires.txt +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.egg-info/top_level.txt +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_anthropic.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_client.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_exceptions.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_openai.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_responses.py +0 -0
- {swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/tests/test_verifier.py +0 -0
|
@@ -111,10 +111,12 @@ class SwiftAPI:
|
|
|
111
111
|
|
|
112
112
|
# Policy violations (denied actions)
|
|
113
113
|
if response.status_code == 200 and data.get("approved") is False:
|
|
114
|
+
reason = data.get("denial_reason") or data.get("reason", "Action denied by policy")
|
|
115
|
+
action_type = data.get("action_type") or data.get("action", {}).get("type")
|
|
114
116
|
raise PolicyViolation(
|
|
115
|
-
message=
|
|
116
|
-
action_type=
|
|
117
|
-
denial_reason=
|
|
117
|
+
message=reason,
|
|
118
|
+
action_type=action_type,
|
|
119
|
+
denial_reason=reason,
|
|
118
120
|
)
|
|
119
121
|
|
|
120
122
|
# Other errors
|
|
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
|
{swiftapi_python-1.2.1 → swiftapi_python-1.2.2}/swiftapi_python.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
|