deeprails 1.6.0__tar.gz → 1.14.0__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.
Files changed (105) hide show
  1. deeprails-1.14.0/.release-please-manifest.json +3 -0
  2. deeprails-1.14.0/CHANGELOG.md +165 -0
  3. {deeprails-1.6.0 → deeprails-1.14.0}/PKG-INFO +40 -32
  4. {deeprails-1.6.0 → deeprails-1.14.0}/README.md +38 -30
  5. {deeprails-1.6.0 → deeprails-1.14.0}/api.md +26 -14
  6. {deeprails-1.6.0 → deeprails-1.14.0}/pyproject.toml +2 -2
  7. {deeprails-1.6.0 → deeprails-1.14.0}/requirements-dev.lock +1 -1
  8. {deeprails-1.6.0 → deeprails-1.14.0}/requirements.lock +1 -1
  9. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_client.py +9 -9
  10. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_streaming.py +4 -6
  11. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_utils.py +1 -1
  12. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_version.py +1 -1
  13. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/resources/__init__.py +14 -14
  14. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/resources/defend.py +115 -71
  15. deeprails-1.14.0/src/deeprails/resources/files.py +175 -0
  16. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/resources/monitor.py +174 -76
  17. deeprails-1.14.0/src/deeprails/types/__init__.py +24 -0
  18. deeprails-1.14.0/src/deeprails/types/defend_create_response.py +22 -0
  19. deeprails-1.14.0/src/deeprails/types/defend_create_workflow_params.py +70 -0
  20. deeprails-1.14.0/src/deeprails/types/defend_response.py +145 -0
  21. deeprails-1.14.0/src/deeprails/types/defend_retrieve_workflow_params.py +15 -0
  22. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/types/defend_submit_event_params.py +4 -3
  23. deeprails-1.14.0/src/deeprails/types/defend_update_response.py +22 -0
  24. deeprails-1.14.0/src/deeprails/types/file_response.py +18 -0
  25. deeprails-1.14.0/src/deeprails/types/file_upload_params.py +14 -0
  26. deeprails-1.14.0/src/deeprails/types/monitor_create_params.py +46 -0
  27. deeprails-1.14.0/src/deeprails/types/monitor_create_response.py +23 -0
  28. deeprails-1.14.0/src/deeprails/types/monitor_detail_response.py +163 -0
  29. deeprails-1.14.0/src/deeprails/types/monitor_event_detail_response.py +68 -0
  30. deeprails-1.14.0/src/deeprails/types/monitor_event_response.py +19 -0
  31. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/types/monitor_retrieve_params.py +4 -1
  32. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/types/monitor_submit_event_params.py +3 -25
  33. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/types/monitor_update_params.py +4 -4
  34. deeprails-1.14.0/src/deeprails/types/monitor_update_response.py +23 -0
  35. deeprails-1.14.0/src/deeprails/types/workflow_event_detail_response.py +114 -0
  36. deeprails-1.14.0/src/deeprails/types/workflow_event_response.py +22 -0
  37. {deeprails-1.6.0 → deeprails-1.14.0}/tests/api_resources/test_defend.py +81 -58
  38. deeprails-1.14.0/tests/api_resources/test_files.py +92 -0
  39. {deeprails-1.6.0 → deeprails-1.14.0}/tests/api_resources/test_monitor.py +155 -49
  40. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_client.py +212 -182
  41. deeprails-1.6.0/.release-please-manifest.json +0 -3
  42. deeprails-1.6.0/CHANGELOG.md +0 -76
  43. deeprails-1.6.0/SECURITY.md +0 -27
  44. deeprails-1.6.0/src/deeprails/resources/evaluate.py +0 -334
  45. deeprails-1.6.0/src/deeprails/types/__init__.py +0 -18
  46. deeprails-1.6.0/src/deeprails/types/api_response.py +0 -49
  47. deeprails-1.6.0/src/deeprails/types/defend_create_workflow_params.py +0 -56
  48. deeprails-1.6.0/src/deeprails/types/defend_response.py +0 -50
  49. deeprails-1.6.0/src/deeprails/types/evaluate_create_params.py +0 -62
  50. deeprails-1.6.0/src/deeprails/types/evaluation.py +0 -104
  51. deeprails-1.6.0/src/deeprails/types/monitor_create_params.py +0 -15
  52. deeprails-1.6.0/src/deeprails/types/monitor_retrieve_response.py +0 -80
  53. deeprails-1.6.0/src/deeprails/types/monitor_submit_event_response.py +0 -35
  54. deeprails-1.6.0/src/deeprails/types/workflow_event_response.py +0 -33
  55. deeprails-1.6.0/tests/api_resources/test_evaluate.py +0 -222
  56. {deeprails-1.6.0 → deeprails-1.14.0}/.gitignore +0 -0
  57. {deeprails-1.6.0 → deeprails-1.14.0}/CONTRIBUTING.md +0 -0
  58. {deeprails-1.6.0 → deeprails-1.14.0}/LICENSE +0 -0
  59. {deeprails-1.6.0 → deeprails-1.14.0}/bin/check-release-environment +0 -0
  60. {deeprails-1.6.0 → deeprails-1.14.0}/bin/publish-pypi +0 -0
  61. {deeprails-1.6.0 → deeprails-1.14.0}/examples/.keep +0 -0
  62. {deeprails-1.6.0 → deeprails-1.14.0}/noxfile.py +0 -0
  63. {deeprails-1.6.0 → deeprails-1.14.0}/release-please-config.json +0 -0
  64. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/__init__.py +0 -0
  65. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_base_client.py +0 -0
  66. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_compat.py +0 -0
  67. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_constants.py +0 -0
  68. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_exceptions.py +0 -0
  69. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_files.py +0 -0
  70. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_models.py +0 -0
  71. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_qs.py +0 -0
  72. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_resource.py +0 -0
  73. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_response.py +0 -0
  74. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_types.py +0 -0
  75. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/__init__.py +0 -0
  76. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_compat.py +0 -0
  77. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_datetime_parse.py +0 -0
  78. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_logs.py +0 -0
  79. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_proxy.py +0 -0
  80. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_reflection.py +0 -0
  81. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_resources_proxy.py +0 -0
  82. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_streams.py +0 -0
  83. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_sync.py +0 -0
  84. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_transform.py +0 -0
  85. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/_utils/_typing.py +0 -0
  86. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/lib/.keep +0 -0
  87. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/py.typed +0 -0
  88. {deeprails-1.6.0 → deeprails-1.14.0}/src/deeprails/types/defend_update_workflow_params.py +0 -0
  89. {deeprails-1.6.0 → deeprails-1.14.0}/tests/__init__.py +0 -0
  90. {deeprails-1.6.0 → deeprails-1.14.0}/tests/api_resources/__init__.py +0 -0
  91. {deeprails-1.6.0 → deeprails-1.14.0}/tests/conftest.py +0 -0
  92. {deeprails-1.6.0 → deeprails-1.14.0}/tests/sample_file.txt +0 -0
  93. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_deepcopy.py +0 -0
  94. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_extract_files.py +0 -0
  95. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_files.py +0 -0
  96. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_models.py +0 -0
  97. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_qs.py +0 -0
  98. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_required_args.py +0 -0
  99. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_response.py +0 -0
  100. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_streaming.py +0 -0
  101. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_transform.py +0 -0
  102. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_utils/test_datetime_parse.py +0 -0
  103. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_utils/test_proxy.py +0 -0
  104. {deeprails-1.6.0 → deeprails-1.14.0}/tests/test_utils/test_typing.py +0 -0
  105. {deeprails-1.6.0 → deeprails-1.14.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.14.0"
3
+ }
@@ -0,0 +1,165 @@
1
+ # Changelog
2
+
3
+ ## 1.14.0 (2025-11-11)
4
+
5
+ Full Changelog: [v1.13.0...v1.14.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.13.0...v1.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add retrieve monitor event and examples ([b295221](https://github.com/deeprails/deeprails-sdk-python/commit/b2952212f394e8947c900735a5841b78bf8ec729))
10
+
11
+ ## 1.13.0 (2025-11-10)
12
+
13
+ Full Changelog: [v1.12.0...v1.13.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.12.0...v1.13.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** Mass restructuring of API, including response bodies and naming schemes ([c72cf32](https://github.com/deeprails/deeprails-sdk-python/commit/c72cf32b37a41673c895a172dd09dcbe90b6ce40))
18
+
19
+
20
+ ### Chores
21
+
22
+ * **internal:** grammar fix (it's -> its) ([11449b2](https://github.com/deeprails/deeprails-sdk-python/commit/11449b27a513a1c5b5b35ba88778c636582feb0b))
23
+
24
+ ## 1.12.0 (2025-11-02)
25
+
26
+ Full Changelog: [v1.11.0...v1.12.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.11.0...v1.12.0)
27
+
28
+ ### Features
29
+
30
+ * **api:** restructure monitor service ([47cac0a](https://github.com/deeprails/deeprails-sdk-python/commit/47cac0a5568f3f73619ccb34e701901468dffbd0))
31
+
32
+
33
+ ### Chores
34
+
35
+ * **internal/tests:** avoid race condition with implicit client cleanup ([0413192](https://github.com/deeprails/deeprails-sdk-python/commit/0413192c31932a21cd34cc4fe63669914a1d1de3))
36
+
37
+ ## 1.11.0 (2025-10-30)
38
+
39
+ Full Changelog: [v1.10.0...v1.11.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.10.0...v1.11.0)
40
+
41
+ ### Features
42
+
43
+ * **api:** Add file and web search as extended ai capabilities ([fc2bb8d](https://github.com/deeprails/deeprails-sdk-python/commit/fc2bb8d0ce8f111279583398469ae9bc0d11d474))
44
+ * **api:** manual updates ([236c2a9](https://github.com/deeprails/deeprails-sdk-python/commit/236c2a923f7bcaa08f92a799be9ca725a0a3b53b))
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * **client:** close streams without requiring full consumption ([db832f6](https://github.com/deeprails/deeprails-sdk-python/commit/db832f6e4067940c762e5d0be9d57cbaf72c7309))
50
+
51
+ ## 1.10.0 (2025-10-29)
52
+
53
+ Full Changelog: [v1.9.0...v1.10.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.9.0...v1.10.0)
54
+
55
+ ### Features
56
+
57
+ * **api:** remove evaluate api ([a3ddec1](https://github.com/deeprails/deeprails-sdk-python/commit/a3ddec1696eaa1247eea2a3bffd61e63d6537d30))
58
+ * **api:** remove evaluate references ([23519a3](https://github.com/deeprails/deeprails-sdk-python/commit/23519a3349a254fe2fe24a51aeb59545d0820b70))
59
+
60
+ ## 1.9.0 (2025-10-24)
61
+
62
+ Full Changelog: [v1.8.0...v1.9.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.8.0...v1.9.0)
63
+
64
+ ### Features
65
+
66
+ * **api:** remove apiresponse from monitor ([4971a99](https://github.com/deeprails/deeprails-sdk-python/commit/4971a99c7357bebbc5e86a2d76d2be55bb34f5ae))
67
+
68
+ ## 1.8.0 (2025-10-22)
69
+
70
+ Full Changelog: [v1.7.0...v1.8.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.7.0...v1.8.0)
71
+
72
+ ### Features
73
+
74
+ * **api:** manual updates ([4b46121](https://github.com/deeprails/deeprails-sdk-python/commit/4b461213615578ca0382f044201c8343d4e9f167))
75
+
76
+ ## 1.7.0 (2025-10-22)
77
+
78
+ Full Changelog: [v1.6.1...v1.7.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.6.1...v1.7.0)
79
+
80
+ ### Features
81
+
82
+ * **api:** update defend naming and data structures ([ba934de](https://github.com/deeprails/deeprails-sdk-python/commit/ba934de8812d71da159a00fa8283876e682aeb7b))
83
+
84
+ ## 1.6.1 (2025-10-22)
85
+
86
+ Full Changelog: [v1.6.0...v1.6.1](https://github.com/deeprails/deeprails-sdk-python/compare/v1.6.0...v1.6.1)
87
+
88
+ ### Chores
89
+
90
+ * bump `httpx-aiohttp` version to 0.1.9 ([fde0f65](https://github.com/deeprails/deeprails-sdk-python/commit/fde0f65f5947336baeee5ae71d7ad49fa8aefc98))
91
+
92
+ ## 1.6.0 (2025-10-20)
93
+
94
+ Full Changelog: [v1.5.0...v1.6.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.5.0...v1.6.0)
95
+
96
+ ### Features
97
+
98
+ * **api:** readme example update ([412839e](https://github.com/deeprails/deeprails-sdk-python/commit/412839e484bcc4b216b88ea3f22849dc9355b643))
99
+
100
+ ## 1.5.0 (2025-10-16)
101
+
102
+ Full Changelog: [v1.4.1...v1.5.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.4.1...v1.5.0)
103
+
104
+ ### Features
105
+
106
+ * **api:** adding support for system_prompt and ground_truth ([be4cd74](https://github.com/deeprails/deeprails-sdk-python/commit/be4cd74a118dc1e4b1ef90f25f311a0862807176))
107
+
108
+ ## 1.4.1 (2025-10-11)
109
+
110
+ Full Changelog: [v1.4.0...v1.4.1](https://github.com/deeprails/deeprails-sdk-python/compare/v1.4.0...v1.4.1)
111
+
112
+ ### Chores
113
+
114
+ * **internal:** detect missing future annotations with ruff ([c0b084c](https://github.com/deeprails/deeprails-sdk-python/commit/c0b084c0f0e71a600274186c30902246aa3816d1))
115
+
116
+ ## 1.4.0 (2025-10-10)
117
+
118
+ Full Changelog: [v1.3.0...v1.4.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.3.0...v1.4.0)
119
+
120
+ ### Features
121
+
122
+ * **api:** manual updates ([b6beebc](https://github.com/deeprails/deeprails-sdk-python/commit/b6beebca6323df5ae35ef30d419d96c831bebbb8))
123
+
124
+ ## 1.3.0 (2025-10-08)
125
+
126
+ Full Changelog: [v1.2.0...v1.3.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.2.0...v1.3.0)
127
+
128
+ ### Features
129
+
130
+ * **api:** adding code samples ([c7f7565](https://github.com/deeprails/deeprails-sdk-python/commit/c7f7565abd00233d22d9c11a5b2c977414e03439))
131
+ * **api:** manual updates ([145946a](https://github.com/deeprails/deeprails-sdk-python/commit/145946a049fb29bff01df6763248330f4d0030ad))
132
+
133
+ ## 1.2.0 (2025-10-07)
134
+
135
+ Full Changelog: [v1.1.0...v1.2.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.1.0...v1.2.0)
136
+
137
+ ### Features
138
+
139
+ * **api:** manual updates ([db3e710](https://github.com/deeprails/deeprails-sdk-python/commit/db3e710d267ccf8d99aa214348846e20b6484db6))
140
+
141
+ ## 1.1.0 (2025-10-07)
142
+
143
+ Full Changelog: [v1.0.0...v1.1.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.0.0...v1.1.0)
144
+
145
+ ### Features
146
+
147
+ * **api:** manual updates ([e55683b](https://github.com/deeprails/deeprails-sdk-python/commit/e55683b590ff636e7c876a172c22c52c3208ceda))
148
+ * **api:** manual updates ([3309c85](https://github.com/deeprails/deeprails-sdk-python/commit/3309c859f9e67579bcd9d2f2d82ed7d67609dca8))
149
+
150
+
151
+ ### Chores
152
+
153
+ * update SDK settings ([9b65ba6](https://github.com/deeprails/deeprails-sdk-python/commit/9b65ba6e8675011f89f035d608a404d7c1d50453))
154
+ * update SDK settings ([957c361](https://github.com/deeprails/deeprails-sdk-python/commit/957c3611f3baf773270a491c66a28b8eeb66d671))
155
+ * update SDK settings ([3dcb5cb](https://github.com/deeprails/deeprails-sdk-python/commit/3dcb5cb41ee6c1008f66dace32125fd38626bdca))
156
+ * update SDK settings ([b283586](https://github.com/deeprails/deeprails-sdk-python/commit/b28358658ea8cbea0d2cb679343a9cf1c342fbd2))
157
+
158
+ ## 1.0.0 (2025-10-07)
159
+
160
+ Full Changelog: [v0.0.1...v1.0.0](https://github.com/deeprails/deeprails-python-sdk/compare/v0.0.1...v1.0.0)
161
+
162
+ ### Chores
163
+
164
+ * update SDK settings ([3dcb5cb](https://github.com/deeprails/deeprails-python-sdk/commit/3dcb5cb41ee6c1008f66dace32125fd38626bdca))
165
+ * update SDK settings ([b283586](https://github.com/deeprails/deeprails-python-sdk/commit/b28358658ea8cbea0d2cb679343a9cf1c342fbd2))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deeprails
3
- Version: 1.6.0
3
+ Version: 1.14.0
4
4
  Summary: The official Python library for the deeprails API
5
5
  Project-URL: Homepage, https://docs.deeprails.com/
6
6
  Project-URL: Repository, https://github.com/deeprails/deeprails-sdk-python
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # Deeprails Python API library
@@ -65,16 +65,17 @@ client = Deeprails(
65
65
  api_key=os.environ.get("DEEPRAILS_API_KEY"), # This is the default and can be omitted
66
66
  )
67
67
 
68
- defend_response = client.defend.create_workflow(
68
+ defend_create_response = client.defend.create_workflow(
69
69
  improvement_action="fixit",
70
- metrics={
70
+ name="Push Alert Workflow",
71
+ threshold_type="custom",
72
+ custom_hallucination_threshold_values={
71
73
  "completeness": 0.7,
72
74
  "instruction_adherence": 0.75,
73
75
  },
74
- name="Push Alert Workflow",
75
- type="custom",
76
+ web_search=True,
76
77
  )
77
- print(defend_response.workflow_id)
78
+ print(defend_create_response.workflow_id)
78
79
  ```
79
80
 
80
81
  While you can provide an `api_key` keyword argument,
@@ -97,16 +98,17 @@ client = AsyncDeeprails(
97
98
 
98
99
 
99
100
  async def main() -> None:
100
- defend_response = await client.defend.create_workflow(
101
+ defend_create_response = await client.defend.create_workflow(
101
102
  improvement_action="fixit",
102
- metrics={
103
+ name="Push Alert Workflow",
104
+ threshold_type="custom",
105
+ custom_hallucination_threshold_values={
103
106
  "completeness": 0.7,
104
107
  "instruction_adherence": 0.75,
105
108
  },
106
- name="Push Alert Workflow",
107
- type="custom",
109
+ web_search=True,
108
110
  )
109
- print(defend_response.workflow_id)
111
+ print(defend_create_response.workflow_id)
110
112
 
111
113
 
112
114
  asyncio.run(main())
@@ -138,16 +140,17 @@ async def main() -> None:
138
140
  api_key="My API Key",
139
141
  http_client=DefaultAioHttpClient(),
140
142
  ) as client:
141
- defend_response = await client.defend.create_workflow(
143
+ defend_create_response = await client.defend.create_workflow(
142
144
  improvement_action="fixit",
143
- metrics={
145
+ name="Push Alert Workflow",
146
+ threshold_type="custom",
147
+ custom_hallucination_threshold_values={
144
148
  "completeness": 0.7,
145
149
  "instruction_adherence": 0.75,
146
150
  },
147
- name="Push Alert Workflow",
148
- type="custom",
151
+ web_search=True,
149
152
  )
150
- print(defend_response.workflow_id)
153
+ print(defend_create_response.workflow_id)
151
154
 
152
155
 
153
156
  asyncio.run(main())
@@ -199,12 +202,13 @@ client = Deeprails()
199
202
  try:
200
203
  client.defend.create_workflow(
201
204
  improvement_action="fixit",
202
- metrics={
205
+ name="Push Alert Workflow",
206
+ threshold_type="custom",
207
+ custom_hallucination_threshold_values={
203
208
  "completeness": 0.7,
204
209
  "instruction_adherence": 0.75,
205
210
  },
206
- name="Push Alert Workflow",
207
- type="custom",
211
+ web_search=True,
208
212
  )
209
213
  except deeprails.APIConnectionError as e:
210
214
  print("The server could not be reached")
@@ -250,12 +254,13 @@ client = Deeprails(
250
254
  # Or, configure per-request:
251
255
  client.with_options(max_retries=5).defend.create_workflow(
252
256
  improvement_action="fixit",
253
- metrics={
257
+ name="Push Alert Workflow",
258
+ threshold_type="custom",
259
+ custom_hallucination_threshold_values={
254
260
  "completeness": 0.7,
255
261
  "instruction_adherence": 0.75,
256
262
  },
257
- name="Push Alert Workflow",
258
- type="custom",
263
+ web_search=True,
259
264
  )
260
265
  ```
261
266
 
@@ -281,12 +286,13 @@ client = Deeprails(
281
286
  # Override per-request:
282
287
  client.with_options(timeout=5.0).defend.create_workflow(
283
288
  improvement_action="fixit",
284
- metrics={
289
+ name="Push Alert Workflow",
290
+ threshold_type="custom",
291
+ custom_hallucination_threshold_values={
285
292
  "completeness": 0.7,
286
293
  "instruction_adherence": 0.75,
287
294
  },
288
- name="Push Alert Workflow",
289
- type="custom",
295
+ web_search=True,
290
296
  )
291
297
  ```
292
298
 
@@ -330,12 +336,13 @@ from deeprails import Deeprails
330
336
  client = Deeprails()
331
337
  response = client.defend.with_raw_response.create_workflow(
332
338
  improvement_action="fixit",
333
- metrics={
339
+ name="Push Alert Workflow",
340
+ threshold_type="custom",
341
+ custom_hallucination_threshold_values={
334
342
  "completeness": 0.7,
335
343
  "instruction_adherence": 0.75,
336
344
  },
337
- name="Push Alert Workflow",
338
- type="custom",
345
+ web_search=True,
339
346
  )
340
347
  print(response.headers.get('X-My-Header'))
341
348
 
@@ -356,12 +363,13 @@ To stream the response body, use `.with_streaming_response` instead, which requi
356
363
  ```python
357
364
  with client.defend.with_streaming_response.create_workflow(
358
365
  improvement_action="fixit",
359
- metrics={
366
+ name="Push Alert Workflow",
367
+ threshold_type="custom",
368
+ custom_hallucination_threshold_values={
360
369
  "completeness": 0.7,
361
370
  "instruction_adherence": 0.75,
362
371
  },
363
- name="Push Alert Workflow",
364
- type="custom",
372
+ web_search=True,
365
373
  ) as response:
366
374
  print(response.headers.get("X-My-Header"))
367
375
 
@@ -30,16 +30,17 @@ client = Deeprails(
30
30
  api_key=os.environ.get("DEEPRAILS_API_KEY"), # This is the default and can be omitted
31
31
  )
32
32
 
33
- defend_response = client.defend.create_workflow(
33
+ defend_create_response = client.defend.create_workflow(
34
34
  improvement_action="fixit",
35
- metrics={
35
+ name="Push Alert Workflow",
36
+ threshold_type="custom",
37
+ custom_hallucination_threshold_values={
36
38
  "completeness": 0.7,
37
39
  "instruction_adherence": 0.75,
38
40
  },
39
- name="Push Alert Workflow",
40
- type="custom",
41
+ web_search=True,
41
42
  )
42
- print(defend_response.workflow_id)
43
+ print(defend_create_response.workflow_id)
43
44
  ```
44
45
 
45
46
  While you can provide an `api_key` keyword argument,
@@ -62,16 +63,17 @@ client = AsyncDeeprails(
62
63
 
63
64
 
64
65
  async def main() -> None:
65
- defend_response = await client.defend.create_workflow(
66
+ defend_create_response = await client.defend.create_workflow(
66
67
  improvement_action="fixit",
67
- metrics={
68
+ name="Push Alert Workflow",
69
+ threshold_type="custom",
70
+ custom_hallucination_threshold_values={
68
71
  "completeness": 0.7,
69
72
  "instruction_adherence": 0.75,
70
73
  },
71
- name="Push Alert Workflow",
72
- type="custom",
74
+ web_search=True,
73
75
  )
74
- print(defend_response.workflow_id)
76
+ print(defend_create_response.workflow_id)
75
77
 
76
78
 
77
79
  asyncio.run(main())
@@ -103,16 +105,17 @@ async def main() -> None:
103
105
  api_key="My API Key",
104
106
  http_client=DefaultAioHttpClient(),
105
107
  ) as client:
106
- defend_response = await client.defend.create_workflow(
108
+ defend_create_response = await client.defend.create_workflow(
107
109
  improvement_action="fixit",
108
- metrics={
110
+ name="Push Alert Workflow",
111
+ threshold_type="custom",
112
+ custom_hallucination_threshold_values={
109
113
  "completeness": 0.7,
110
114
  "instruction_adherence": 0.75,
111
115
  },
112
- name="Push Alert Workflow",
113
- type="custom",
116
+ web_search=True,
114
117
  )
115
- print(defend_response.workflow_id)
118
+ print(defend_create_response.workflow_id)
116
119
 
117
120
 
118
121
  asyncio.run(main())
@@ -164,12 +167,13 @@ client = Deeprails()
164
167
  try:
165
168
  client.defend.create_workflow(
166
169
  improvement_action="fixit",
167
- metrics={
170
+ name="Push Alert Workflow",
171
+ threshold_type="custom",
172
+ custom_hallucination_threshold_values={
168
173
  "completeness": 0.7,
169
174
  "instruction_adherence": 0.75,
170
175
  },
171
- name="Push Alert Workflow",
172
- type="custom",
176
+ web_search=True,
173
177
  )
174
178
  except deeprails.APIConnectionError as e:
175
179
  print("The server could not be reached")
@@ -215,12 +219,13 @@ client = Deeprails(
215
219
  # Or, configure per-request:
216
220
  client.with_options(max_retries=5).defend.create_workflow(
217
221
  improvement_action="fixit",
218
- metrics={
222
+ name="Push Alert Workflow",
223
+ threshold_type="custom",
224
+ custom_hallucination_threshold_values={
219
225
  "completeness": 0.7,
220
226
  "instruction_adherence": 0.75,
221
227
  },
222
- name="Push Alert Workflow",
223
- type="custom",
228
+ web_search=True,
224
229
  )
225
230
  ```
226
231
 
@@ -246,12 +251,13 @@ client = Deeprails(
246
251
  # Override per-request:
247
252
  client.with_options(timeout=5.0).defend.create_workflow(
248
253
  improvement_action="fixit",
249
- metrics={
254
+ name="Push Alert Workflow",
255
+ threshold_type="custom",
256
+ custom_hallucination_threshold_values={
250
257
  "completeness": 0.7,
251
258
  "instruction_adherence": 0.75,
252
259
  },
253
- name="Push Alert Workflow",
254
- type="custom",
260
+ web_search=True,
255
261
  )
256
262
  ```
257
263
 
@@ -295,12 +301,13 @@ from deeprails import Deeprails
295
301
  client = Deeprails()
296
302
  response = client.defend.with_raw_response.create_workflow(
297
303
  improvement_action="fixit",
298
- metrics={
304
+ name="Push Alert Workflow",
305
+ threshold_type="custom",
306
+ custom_hallucination_threshold_values={
299
307
  "completeness": 0.7,
300
308
  "instruction_adherence": 0.75,
301
309
  },
302
- name="Push Alert Workflow",
303
- type="custom",
310
+ web_search=True,
304
311
  )
305
312
  print(response.headers.get('X-My-Header'))
306
313
 
@@ -321,12 +328,13 @@ To stream the response body, use `.with_streaming_response` instead, which requi
321
328
  ```python
322
329
  with client.defend.with_streaming_response.create_workflow(
323
330
  improvement_action="fixit",
324
- metrics={
331
+ name="Push Alert Workflow",
332
+ threshold_type="custom",
333
+ custom_hallucination_threshold_values={
325
334
  "completeness": 0.7,
326
335
  "instruction_adherence": 0.75,
327
336
  },
328
- name="Push Alert Workflow",
329
- type="custom",
337
+ web_search=True,
330
338
  ) as response:
331
339
  print(response.headers.get("X-My-Header"))
332
340
 
@@ -3,41 +3,53 @@
3
3
  Types:
4
4
 
5
5
  ```python
6
- from deeprails.types import DefendResponse, WorkflowEventResponse
6
+ from deeprails.types import (
7
+ DefendCreateResponse,
8
+ DefendResponse,
9
+ DefendUpdateResponse,
10
+ WorkflowEventDetailResponse,
11
+ WorkflowEventResponse,
12
+ )
7
13
  ```
8
14
 
9
15
  Methods:
10
16
 
11
- - <code title="post /defend">client.defend.<a href="./src/deeprails/resources/defend.py">create_workflow</a>(\*\*<a href="src/deeprails/types/defend_create_workflow_params.py">params</a>) -> <a href="./src/deeprails/types/defend_response.py">DefendResponse</a></code>
12
- - <code title="get /defend/{workflow_id}/events/{event_id}">client.defend.<a href="./src/deeprails/resources/defend.py">retrieve_event</a>(event_id, \*, workflow_id) -> <a href="./src/deeprails/types/workflow_event_response.py">WorkflowEventResponse</a></code>
13
- - <code title="get /defend/{workflow_id}">client.defend.<a href="./src/deeprails/resources/defend.py">retrieve_workflow</a>(workflow_id) -> <a href="./src/deeprails/types/defend_response.py">DefendResponse</a></code>
17
+ - <code title="post /defend">client.defend.<a href="./src/deeprails/resources/defend.py">create_workflow</a>(\*\*<a href="src/deeprails/types/defend_create_workflow_params.py">params</a>) -> <a href="./src/deeprails/types/defend_create_response.py">DefendCreateResponse</a></code>
18
+ - <code title="get /defend/{workflow_id}/events/{event_id}">client.defend.<a href="./src/deeprails/resources/defend.py">retrieve_event</a>(event_id, \*, workflow_id) -> <a href="./src/deeprails/types/workflow_event_detail_response.py">WorkflowEventDetailResponse</a></code>
19
+ - <code title="get /defend/{workflow_id}">client.defend.<a href="./src/deeprails/resources/defend.py">retrieve_workflow</a>(workflow_id, \*\*<a href="src/deeprails/types/defend_retrieve_workflow_params.py">params</a>) -> <a href="./src/deeprails/types/defend_response.py">DefendResponse</a></code>
14
20
  - <code title="post /defend/{workflow_id}/events">client.defend.<a href="./src/deeprails/resources/defend.py">submit_event</a>(workflow_id, \*\*<a href="src/deeprails/types/defend_submit_event_params.py">params</a>) -> <a href="./src/deeprails/types/workflow_event_response.py">WorkflowEventResponse</a></code>
15
- - <code title="put /defend/{workflow_id}">client.defend.<a href="./src/deeprails/resources/defend.py">update_workflow</a>(workflow_id, \*\*<a href="src/deeprails/types/defend_update_workflow_params.py">params</a>) -> <a href="./src/deeprails/types/defend_response.py">DefendResponse</a></code>
21
+ - <code title="put /defend/{workflow_id}">client.defend.<a href="./src/deeprails/resources/defend.py">update_workflow</a>(workflow_id, \*\*<a href="src/deeprails/types/defend_update_workflow_params.py">params</a>) -> <a href="./src/deeprails/types/defend_update_response.py">DefendUpdateResponse</a></code>
16
22
 
17
23
  # Monitor
18
24
 
19
25
  Types:
20
26
 
21
27
  ```python
22
- from deeprails.types import APIResponse, MonitorRetrieveResponse, MonitorSubmitEventResponse
28
+ from deeprails.types import (
29
+ MonitorCreateResponse,
30
+ MonitorDetailResponse,
31
+ MonitorEventDetailResponse,
32
+ MonitorEventResponse,
33
+ MonitorUpdateResponse,
34
+ )
23
35
  ```
24
36
 
25
37
  Methods:
26
38
 
27
- - <code title="post /monitor">client.monitor.<a href="./src/deeprails/resources/monitor.py">create</a>(\*\*<a href="src/deeprails/types/monitor_create_params.py">params</a>) -> <a href="./src/deeprails/types/api_response.py">APIResponse</a></code>
28
- - <code title="get /monitor/{monitor_id}">client.monitor.<a href="./src/deeprails/resources/monitor.py">retrieve</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_retrieve_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_retrieve_response.py">MonitorRetrieveResponse</a></code>
29
- - <code title="put /monitor/{monitor_id}">client.monitor.<a href="./src/deeprails/resources/monitor.py">update</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_update_params.py">params</a>) -> <a href="./src/deeprails/types/api_response.py">APIResponse</a></code>
30
- - <code title="post /monitor/{monitor_id}/events">client.monitor.<a href="./src/deeprails/resources/monitor.py">submit_event</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_submit_event_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_submit_event_response.py">MonitorSubmitEventResponse</a></code>
39
+ - <code title="post /monitor">client.monitor.<a href="./src/deeprails/resources/monitor.py">create</a>(\*\*<a href="src/deeprails/types/monitor_create_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_create_response.py">MonitorCreateResponse</a></code>
40
+ - <code title="get /monitor/{monitor_id}">client.monitor.<a href="./src/deeprails/resources/monitor.py">retrieve</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_retrieve_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_detail_response.py">MonitorDetailResponse</a></code>
41
+ - <code title="put /monitor/{monitor_id}">client.monitor.<a href="./src/deeprails/resources/monitor.py">update</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_update_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_update_response.py">MonitorUpdateResponse</a></code>
42
+ - <code title="get /monitor/{monitor_id}/events/{event_id}">client.monitor.<a href="./src/deeprails/resources/monitor.py">retrieve_event</a>(event_id, \*, monitor_id) -> <a href="./src/deeprails/types/monitor_event_detail_response.py">MonitorEventDetailResponse</a></code>
43
+ - <code title="post /monitor/{monitor_id}/events">client.monitor.<a href="./src/deeprails/resources/monitor.py">submit_event</a>(monitor_id, \*\*<a href="src/deeprails/types/monitor_submit_event_params.py">params</a>) -> <a href="./src/deeprails/types/monitor_event_response.py">MonitorEventResponse</a></code>
31
44
 
32
- # Evaluate
45
+ # Files
33
46
 
34
47
  Types:
35
48
 
36
49
  ```python
37
- from deeprails.types import Evaluation
50
+ from deeprails.types import FileResponse
38
51
  ```
39
52
 
40
53
  Methods:
41
54
 
42
- - <code title="post /evaluate">client.evaluate.<a href="./src/deeprails/resources/evaluate.py">create</a>(\*\*<a href="src/deeprails/types/evaluate_create_params.py">params</a>) -> <a href="./src/deeprails/types/evaluation.py">Evaluation</a></code>
43
- - <code title="get /evaluate/{eval_id}">client.evaluate.<a href="./src/deeprails/resources/evaluate.py">retrieve</a>(eval_id) -> <a href="./src/deeprails/types/evaluation.py">Evaluation</a></code>
55
+ - <code title="post /files/upload">client.files.<a href="./src/deeprails/resources/files.py">upload</a>(\*\*<a href="src/deeprails/types/file_upload_params.py">params</a>) -> <a href="./src/deeprails/types/file_response.py">FileResponse</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deeprails"
3
- version = "1.6.0"
3
+ version = "1.14.0"
4
4
  description = "The official Python library for the deeprails API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -39,7 +39,7 @@ Homepage = "https://docs.deeprails.com/"
39
39
  Repository = "https://github.com/deeprails/deeprails-sdk-python"
40
40
 
41
41
  [project.optional-dependencies]
42
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
42
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
43
43
 
44
44
  [tool.rye]
45
45
  managed = true
@@ -56,7 +56,7 @@ httpx==0.28.1
56
56
  # via deeprails
57
57
  # via httpx-aiohttp
58
58
  # via respx
59
- httpx-aiohttp==0.1.8
59
+ httpx-aiohttp==0.1.9
60
60
  # via deeprails
61
61
  idna==3.4
62
62
  # via anyio
@@ -43,7 +43,7 @@ httpcore==1.0.9
43
43
  httpx==0.28.1
44
44
  # via deeprails
45
45
  # via httpx-aiohttp
46
- httpx-aiohttp==0.1.8
46
+ httpx-aiohttp==0.1.9
47
47
  # via deeprails
48
48
  idna==3.4
49
49
  # via anyio