deeprails 1.2.0__tar.gz → 1.3.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.

Potentially problematic release.


This version of deeprails might be problematic. Click here for more details.

Files changed (86) hide show
  1. deeprails-1.3.0/.release-please-manifest.json +3 -0
  2. {deeprails-1.2.0 → deeprails-1.3.0}/CHANGELOG.md +9 -0
  3. {deeprails-1.2.0 → deeprails-1.3.0}/PKG-INFO +10 -10
  4. {deeprails-1.2.0 → deeprails-1.3.0}/README.md +9 -9
  5. {deeprails-1.2.0 → deeprails-1.3.0}/pyproject.toml +1 -1
  6. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_version.py +1 -1
  7. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/resources/defend.py +16 -22
  8. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/resources/evaluate.py +2 -2
  9. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/resources/monitor.py +16 -8
  10. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/api_response.py +0 -1
  11. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/defend_create_workflow_params.py +1 -1
  12. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/defend_response.py +1 -1
  13. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/defend_update_workflow_params.py +1 -4
  14. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_retrieve_response.py +0 -1
  15. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_submit_event_response.py +0 -1
  16. {deeprails-1.2.0 → deeprails-1.3.0}/tests/api_resources/test_defend.py +0 -2
  17. deeprails-1.2.0/.release-please-manifest.json +0 -3
  18. {deeprails-1.2.0 → deeprails-1.3.0}/.gitignore +0 -0
  19. {deeprails-1.2.0 → deeprails-1.3.0}/CONTRIBUTING.md +0 -0
  20. {deeprails-1.2.0 → deeprails-1.3.0}/LICENSE +0 -0
  21. {deeprails-1.2.0 → deeprails-1.3.0}/SECURITY.md +0 -0
  22. {deeprails-1.2.0 → deeprails-1.3.0}/api.md +0 -0
  23. {deeprails-1.2.0 → deeprails-1.3.0}/bin/check-release-environment +0 -0
  24. {deeprails-1.2.0 → deeprails-1.3.0}/bin/publish-pypi +0 -0
  25. {deeprails-1.2.0 → deeprails-1.3.0}/examples/.keep +0 -0
  26. {deeprails-1.2.0 → deeprails-1.3.0}/noxfile.py +0 -0
  27. {deeprails-1.2.0 → deeprails-1.3.0}/release-please-config.json +0 -0
  28. {deeprails-1.2.0 → deeprails-1.3.0}/requirements-dev.lock +0 -0
  29. {deeprails-1.2.0 → deeprails-1.3.0}/requirements.lock +0 -0
  30. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/__init__.py +0 -0
  31. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_base_client.py +0 -0
  32. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_client.py +0 -0
  33. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_compat.py +0 -0
  34. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_constants.py +0 -0
  35. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_exceptions.py +0 -0
  36. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_files.py +0 -0
  37. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_models.py +0 -0
  38. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_qs.py +0 -0
  39. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_resource.py +0 -0
  40. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_response.py +0 -0
  41. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_streaming.py +0 -0
  42. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_types.py +0 -0
  43. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/__init__.py +0 -0
  44. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_compat.py +0 -0
  45. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_datetime_parse.py +0 -0
  46. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_logs.py +0 -0
  47. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_proxy.py +0 -0
  48. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_reflection.py +0 -0
  49. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_resources_proxy.py +0 -0
  50. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_streams.py +0 -0
  51. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_sync.py +0 -0
  52. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_transform.py +0 -0
  53. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_typing.py +0 -0
  54. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/_utils/_utils.py +0 -0
  55. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/lib/.keep +0 -0
  56. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/py.typed +0 -0
  57. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/resources/__init__.py +0 -0
  58. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/__init__.py +0 -0
  59. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/defend_submit_event_params.py +0 -0
  60. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/evaluate_create_params.py +0 -0
  61. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/evaluation.py +0 -0
  62. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_create_params.py +0 -0
  63. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_retrieve_params.py +0 -0
  64. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_submit_event_params.py +0 -0
  65. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/monitor_update_params.py +0 -0
  66. {deeprails-1.2.0 → deeprails-1.3.0}/src/deeprails/types/workflow_event_response.py +0 -0
  67. {deeprails-1.2.0 → deeprails-1.3.0}/tests/__init__.py +0 -0
  68. {deeprails-1.2.0 → deeprails-1.3.0}/tests/api_resources/__init__.py +0 -0
  69. {deeprails-1.2.0 → deeprails-1.3.0}/tests/api_resources/test_evaluate.py +0 -0
  70. {deeprails-1.2.0 → deeprails-1.3.0}/tests/api_resources/test_monitor.py +0 -0
  71. {deeprails-1.2.0 → deeprails-1.3.0}/tests/conftest.py +0 -0
  72. {deeprails-1.2.0 → deeprails-1.3.0}/tests/sample_file.txt +0 -0
  73. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_client.py +0 -0
  74. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_deepcopy.py +0 -0
  75. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_extract_files.py +0 -0
  76. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_files.py +0 -0
  77. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_models.py +0 -0
  78. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_qs.py +0 -0
  79. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_required_args.py +0 -0
  80. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_response.py +0 -0
  81. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_streaming.py +0 -0
  82. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_transform.py +0 -0
  83. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_utils/test_datetime_parse.py +0 -0
  84. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_utils/test_proxy.py +0 -0
  85. {deeprails-1.2.0 → deeprails-1.3.0}/tests/test_utils/test_typing.py +0 -0
  86. {deeprails-1.2.0 → deeprails-1.3.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.3.0"
3
+ }
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0 (2025-10-08)
4
+
5
+ Full Changelog: [v1.2.0...v1.3.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.2.0...v1.3.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** adding code samples ([c7f7565](https://github.com/deeprails/deeprails-sdk-python/commit/c7f7565abd00233d22d9c11a5b2c977414e03439))
10
+ * **api:** manual updates ([145946a](https://github.com/deeprails/deeprails-sdk-python/commit/145946a049fb29bff01df6763248330f4d0030ad))
11
+
3
12
  ## 1.2.0 (2025-10-07)
4
13
 
5
14
  Full Changelog: [v1.1.0...v1.2.0](https://github.com/deeprails/deeprails-sdk-python/compare/v1.1.0...v1.2.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deeprails
3
- Version: 1.2.0
3
+ Version: 1.3.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
@@ -44,7 +44,7 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
44
44
 
45
45
  ## Documentation
46
46
 
47
- The full API of this library can be found in [api.md](https://github.com/deeprails/deeprails-sdk-python/tree/main/api.md).
47
+ The REST API documentation can be found on [docs.deeprails.com](https://docs.deeprails.com). The full API of this library can be found in [api.md](https://github.com/deeprails/deeprails-sdk-python/tree/main/api.md).
48
48
 
49
49
  ## Installation
50
50
 
@@ -68,7 +68,7 @@ client = Deeprails(
68
68
  defend_response = client.defend.create_workflow(
69
69
  improvement_action="fixit",
70
70
  metrics={
71
- "completeness": 0.85,
71
+ "completeness": 0.8,
72
72
  "instruction_adherence": 0.75,
73
73
  },
74
74
  name="Push Alert Workflow",
@@ -100,7 +100,7 @@ async def main() -> None:
100
100
  defend_response = await client.defend.create_workflow(
101
101
  improvement_action="fixit",
102
102
  metrics={
103
- "completeness": 0.85,
103
+ "completeness": 0.8,
104
104
  "instruction_adherence": 0.75,
105
105
  },
106
106
  name="Push Alert Workflow",
@@ -141,7 +141,7 @@ async def main() -> None:
141
141
  defend_response = await client.defend.create_workflow(
142
142
  improvement_action="fixit",
143
143
  metrics={
144
- "completeness": 0.85,
144
+ "completeness": 0.8,
145
145
  "instruction_adherence": 0.75,
146
146
  },
147
147
  name="Push Alert Workflow",
@@ -201,7 +201,7 @@ try:
201
201
  client.defend.create_workflow(
202
202
  improvement_action="fixit",
203
203
  metrics={
204
- "completeness": 0.85,
204
+ "completeness": 0.8,
205
205
  "instruction_adherence": 0.75,
206
206
  },
207
207
  name="Push Alert Workflow",
@@ -252,7 +252,7 @@ client = Deeprails(
252
252
  client.with_options(max_retries=5).defend.create_workflow(
253
253
  improvement_action="fixit",
254
254
  metrics={
255
- "completeness": 0.85,
255
+ "completeness": 0.8,
256
256
  "instruction_adherence": 0.75,
257
257
  },
258
258
  name="Push Alert Workflow",
@@ -283,7 +283,7 @@ client = Deeprails(
283
283
  client.with_options(timeout=5.0).defend.create_workflow(
284
284
  improvement_action="fixit",
285
285
  metrics={
286
- "completeness": 0.85,
286
+ "completeness": 0.8,
287
287
  "instruction_adherence": 0.75,
288
288
  },
289
289
  name="Push Alert Workflow",
@@ -332,7 +332,7 @@ client = Deeprails()
332
332
  response = client.defend.with_raw_response.create_workflow(
333
333
  improvement_action="fixit",
334
334
  metrics={
335
- "completeness": 0.85,
335
+ "completeness": 0.8,
336
336
  "instruction_adherence": 0.75,
337
337
  },
338
338
  name="Push Alert Workflow",
@@ -358,7 +358,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
358
358
  with client.defend.with_streaming_response.create_workflow(
359
359
  improvement_action="fixit",
360
360
  metrics={
361
- "completeness": 0.85,
361
+ "completeness": 0.8,
362
362
  "instruction_adherence": 0.75,
363
363
  },
364
364
  name="Push Alert Workflow",
@@ -9,7 +9,7 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
9
9
 
10
10
  ## Documentation
11
11
 
12
- The full API of this library can be found in [api.md](api.md).
12
+ The REST API documentation can be found on [docs.deeprails.com](https://docs.deeprails.com). The full API of this library can be found in [api.md](api.md).
13
13
 
14
14
  ## Installation
15
15
 
@@ -33,7 +33,7 @@ client = Deeprails(
33
33
  defend_response = client.defend.create_workflow(
34
34
  improvement_action="fixit",
35
35
  metrics={
36
- "completeness": 0.85,
36
+ "completeness": 0.8,
37
37
  "instruction_adherence": 0.75,
38
38
  },
39
39
  name="Push Alert Workflow",
@@ -65,7 +65,7 @@ async def main() -> None:
65
65
  defend_response = await client.defend.create_workflow(
66
66
  improvement_action="fixit",
67
67
  metrics={
68
- "completeness": 0.85,
68
+ "completeness": 0.8,
69
69
  "instruction_adherence": 0.75,
70
70
  },
71
71
  name="Push Alert Workflow",
@@ -106,7 +106,7 @@ async def main() -> None:
106
106
  defend_response = await client.defend.create_workflow(
107
107
  improvement_action="fixit",
108
108
  metrics={
109
- "completeness": 0.85,
109
+ "completeness": 0.8,
110
110
  "instruction_adherence": 0.75,
111
111
  },
112
112
  name="Push Alert Workflow",
@@ -166,7 +166,7 @@ try:
166
166
  client.defend.create_workflow(
167
167
  improvement_action="fixit",
168
168
  metrics={
169
- "completeness": 0.85,
169
+ "completeness": 0.8,
170
170
  "instruction_adherence": 0.75,
171
171
  },
172
172
  name="Push Alert Workflow",
@@ -217,7 +217,7 @@ client = Deeprails(
217
217
  client.with_options(max_retries=5).defend.create_workflow(
218
218
  improvement_action="fixit",
219
219
  metrics={
220
- "completeness": 0.85,
220
+ "completeness": 0.8,
221
221
  "instruction_adherence": 0.75,
222
222
  },
223
223
  name="Push Alert Workflow",
@@ -248,7 +248,7 @@ client = Deeprails(
248
248
  client.with_options(timeout=5.0).defend.create_workflow(
249
249
  improvement_action="fixit",
250
250
  metrics={
251
- "completeness": 0.85,
251
+ "completeness": 0.8,
252
252
  "instruction_adherence": 0.75,
253
253
  },
254
254
  name="Push Alert Workflow",
@@ -297,7 +297,7 @@ client = Deeprails()
297
297
  response = client.defend.with_raw_response.create_workflow(
298
298
  improvement_action="fixit",
299
299
  metrics={
300
- "completeness": 0.85,
300
+ "completeness": 0.8,
301
301
  "instruction_adherence": 0.75,
302
302
  },
303
303
  name="Push Alert Workflow",
@@ -323,7 +323,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
323
323
  with client.defend.with_streaming_response.create_workflow(
324
324
  improvement_action="fixit",
325
325
  metrics={
326
- "completeness": 0.85,
326
+ "completeness": 0.8,
327
327
  "instruction_adherence": 0.75,
328
328
  },
329
329
  name="Push Alert Workflow",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deeprails"
3
- version = "1.2.0"
3
+ version = "1.3.0"
4
4
  description = "The official Python library for the deeprails API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "deeprails"
4
- __version__ = "1.2.0" # x-release-please-version
4
+ __version__ = "1.3.0" # x-release-please-version
@@ -63,13 +63,13 @@ class DefendResource(SyncAPIResource):
63
63
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
64
64
  ) -> DefendResponse:
65
65
  """
66
- Create a new guardrail workflow with optional guardrail thresholds and
67
- improvement actions.
66
+ Use this endpoint to create a new guardrail workflow with optional guardrail
67
+ thresholds and improvement actions
68
68
 
69
69
  Args:
70
70
  improvement_action: The action used to improve outputs that fail one or guardrail metrics for the
71
71
  workflow events. May be `regenerate`, `fixit`, or null which represents “do
72
- nothing”. ReGen runs the user's exact input prompt with minor induced variance.
72
+ nothing”. Regenerate runs the user's input prompt with minor induced variance.
73
73
  Fixit attempts to directly address the shortcomings of the output using the
74
74
  guardrail failure rationale. Do nothing does not attempt any improvement.
75
75
 
@@ -136,7 +136,7 @@ class DefendResource(SyncAPIResource):
136
136
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
137
137
  ) -> WorkflowEventResponse:
138
138
  """
139
- Retrieve a specific event of a guardrail workflow.
139
+ Use this endpoint to retrieve a specific event of a guardrail workflow
140
140
 
141
141
  Args:
142
142
  extra_headers: Send extra headers
@@ -171,7 +171,7 @@ class DefendResource(SyncAPIResource):
171
171
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
172
172
  ) -> DefendResponse:
173
173
  """
174
- Retrieve the details for a specific guardrail workflow.
174
+ Use this endpoint to retrieve the details for a specific defend workflow
175
175
 
176
176
  Args:
177
177
  extra_headers: Send extra headers
@@ -209,7 +209,8 @@ class DefendResource(SyncAPIResource):
209
209
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
210
210
  ) -> WorkflowEventResponse:
211
211
  """
212
- Submit a model input and output pair to a workflow for evaluation.
212
+ Use this endpoint to submit a model input and output pair to a workflow for
213
+ evaluation
213
214
 
214
215
  Args:
215
216
  model_input: A dictionary of inputs sent to the LLM to generate output. This must contain a
@@ -261,7 +262,6 @@ class DefendResource(SyncAPIResource):
261
262
  *,
262
263
  description: str | Omit = omit,
263
264
  name: str | Omit = omit,
264
- type: Literal["automatic", "custom"] | Omit = omit,
265
265
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
266
266
  # The extra values given here take precedence over values defined on the client or passed to this method.
267
267
  extra_headers: Headers | None = None,
@@ -270,15 +270,13 @@ class DefendResource(SyncAPIResource):
270
270
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
271
271
  ) -> DefendResponse:
272
272
  """
273
- Update an existing guardrail workflow.
273
+ Use this endpoint to update an existing guardrail workflow
274
274
 
275
275
  Args:
276
276
  description: Description for the workflow.
277
277
 
278
278
  name: Name of the workflow.
279
279
 
280
- type: Type of thresholds to use for the workflow, either `automatic` or `custom`.
281
-
282
280
  extra_headers: Send extra headers
283
281
 
284
282
  extra_query: Add additional query parameters to the request
@@ -295,7 +293,6 @@ class DefendResource(SyncAPIResource):
295
293
  {
296
294
  "description": description,
297
295
  "name": name,
298
- "type": type,
299
296
  },
300
297
  defend_update_workflow_params.DefendUpdateWorkflowParams,
301
298
  ),
@@ -344,13 +341,13 @@ class AsyncDefendResource(AsyncAPIResource):
344
341
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
345
342
  ) -> DefendResponse:
346
343
  """
347
- Create a new guardrail workflow with optional guardrail thresholds and
348
- improvement actions.
344
+ Use this endpoint to create a new guardrail workflow with optional guardrail
345
+ thresholds and improvement actions
349
346
 
350
347
  Args:
351
348
  improvement_action: The action used to improve outputs that fail one or guardrail metrics for the
352
349
  workflow events. May be `regenerate`, `fixit`, or null which represents “do
353
- nothing”. ReGen runs the user's exact input prompt with minor induced variance.
350
+ nothing”. Regenerate runs the user's input prompt with minor induced variance.
354
351
  Fixit attempts to directly address the shortcomings of the output using the
355
352
  guardrail failure rationale. Do nothing does not attempt any improvement.
356
353
 
@@ -417,7 +414,7 @@ class AsyncDefendResource(AsyncAPIResource):
417
414
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
418
415
  ) -> WorkflowEventResponse:
419
416
  """
420
- Retrieve a specific event of a guardrail workflow.
417
+ Use this endpoint to retrieve a specific event of a guardrail workflow
421
418
 
422
419
  Args:
423
420
  extra_headers: Send extra headers
@@ -452,7 +449,7 @@ class AsyncDefendResource(AsyncAPIResource):
452
449
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
453
450
  ) -> DefendResponse:
454
451
  """
455
- Retrieve the details for a specific guardrail workflow.
452
+ Use this endpoint to retrieve the details for a specific defend workflow
456
453
 
457
454
  Args:
458
455
  extra_headers: Send extra headers
@@ -490,7 +487,8 @@ class AsyncDefendResource(AsyncAPIResource):
490
487
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
491
488
  ) -> WorkflowEventResponse:
492
489
  """
493
- Submit a model input and output pair to a workflow for evaluation.
490
+ Use this endpoint to submit a model input and output pair to a workflow for
491
+ evaluation
494
492
 
495
493
  Args:
496
494
  model_input: A dictionary of inputs sent to the LLM to generate output. This must contain a
@@ -542,7 +540,6 @@ class AsyncDefendResource(AsyncAPIResource):
542
540
  *,
543
541
  description: str | Omit = omit,
544
542
  name: str | Omit = omit,
545
- type: Literal["automatic", "custom"] | Omit = omit,
546
543
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
547
544
  # The extra values given here take precedence over values defined on the client or passed to this method.
548
545
  extra_headers: Headers | None = None,
@@ -551,15 +548,13 @@ class AsyncDefendResource(AsyncAPIResource):
551
548
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
552
549
  ) -> DefendResponse:
553
550
  """
554
- Update an existing guardrail workflow.
551
+ Use this endpoint to update an existing guardrail workflow
555
552
 
556
553
  Args:
557
554
  description: Description for the workflow.
558
555
 
559
556
  name: Name of the workflow.
560
557
 
561
- type: Type of thresholds to use for the workflow, either `automatic` or `custom`.
562
-
563
558
  extra_headers: Send extra headers
564
559
 
565
560
  extra_query: Add additional query parameters to the request
@@ -576,7 +571,6 @@ class AsyncDefendResource(AsyncAPIResource):
576
571
  {
577
572
  "description": description,
578
573
  "name": name,
579
- "type": type,
580
574
  },
581
575
  defend_update_workflow_params.DefendUpdateWorkflowParams,
582
576
  ),
@@ -133,7 +133,7 @@ class EvaluateResource(SyncAPIResource):
133
133
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
134
134
  ) -> Evaluation:
135
135
  """
136
- Retrieve the evaluation record for a given evaluation ID.
136
+ Use this endpoint to retrieve the evaluation record for a given evaluation ID
137
137
 
138
138
  Args:
139
139
  extra_headers: Send extra headers
@@ -264,7 +264,7 @@ class AsyncEvaluateResource(AsyncAPIResource):
264
264
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
265
265
  ) -> Evaluation:
266
266
  """
267
- Retrieve the evaluation record for a given evaluation ID.
267
+ Use this endpoint to retrieve the evaluation record for a given evaluation ID
268
268
 
269
269
  Args:
270
270
  extra_headers: Send extra headers
@@ -59,7 +59,8 @@ class MonitorResource(SyncAPIResource):
59
59
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
60
60
  ) -> APIResponse:
61
61
  """
62
- Create a new monitor to evaluate model inputs and outputs using guardrails.
62
+ Use this endpoint to create a new monitor to evaluate model inputs and outputs
63
+ using guardrails
63
64
 
64
65
  Args:
65
66
  name: Name of the new monitor.
@@ -102,7 +103,8 @@ class MonitorResource(SyncAPIResource):
102
103
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
103
104
  ) -> MonitorRetrieveResponse:
104
105
  """
105
- Retrieve the details and evaluations associated with a specific monitor.
106
+ Use this endpoint to retrieve the details and evaluations associated with a
107
+ specific monitor
106
108
 
107
109
  Args:
108
110
  limit: Limit the returned events associated with this monitor. Defaults to 10.
@@ -144,7 +146,8 @@ class MonitorResource(SyncAPIResource):
144
146
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
145
147
  ) -> APIResponse:
146
148
  """
147
- Update the name, description, or status of an existing monitor.
149
+ Use this endpoint to update the name, description, or status of an existing
150
+ monitor
148
151
 
149
152
  Args:
150
153
  description: Description of the monitor.
@@ -207,7 +210,8 @@ class MonitorResource(SyncAPIResource):
207
210
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
208
211
  ) -> MonitorSubmitEventResponse:
209
212
  """
210
- Submit a model input and output pair to a monitor for evaluation.
213
+ Use this endpoint to submit a model input and output pair to a monitor for
214
+ evaluation
211
215
 
212
216
  Args:
213
217
  guardrail_metrics: An array of guardrail metrics that the model input and output pair will be
@@ -293,7 +297,8 @@ class AsyncMonitorResource(AsyncAPIResource):
293
297
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
294
298
  ) -> APIResponse:
295
299
  """
296
- Create a new monitor to evaluate model inputs and outputs using guardrails.
300
+ Use this endpoint to create a new monitor to evaluate model inputs and outputs
301
+ using guardrails
297
302
 
298
303
  Args:
299
304
  name: Name of the new monitor.
@@ -336,7 +341,8 @@ class AsyncMonitorResource(AsyncAPIResource):
336
341
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
337
342
  ) -> MonitorRetrieveResponse:
338
343
  """
339
- Retrieve the details and evaluations associated with a specific monitor.
344
+ Use this endpoint to retrieve the details and evaluations associated with a
345
+ specific monitor
340
346
 
341
347
  Args:
342
348
  limit: Limit the returned events associated with this monitor. Defaults to 10.
@@ -378,7 +384,8 @@ class AsyncMonitorResource(AsyncAPIResource):
378
384
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
379
385
  ) -> APIResponse:
380
386
  """
381
- Update the name, description, or status of an existing monitor.
387
+ Use this endpoint to update the name, description, or status of an existing
388
+ monitor
382
389
 
383
390
  Args:
384
391
  description: Description of the monitor.
@@ -441,7 +448,8 @@ class AsyncMonitorResource(AsyncAPIResource):
441
448
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
442
449
  ) -> MonitorSubmitEventResponse:
443
450
  """
444
- Submit a model input and output pair to a monitor for evaluation.
451
+ Use this endpoint to submit a model input and output pair to a monitor for
452
+ evaluation
445
453
 
446
454
  Args:
447
455
  guardrail_metrics: An array of guardrail metrics that the model input and output pair will be
@@ -41,7 +41,6 @@ class APIResponse(BaseModel):
41
41
  """Represents whether the request was completed successfully."""
42
42
 
43
43
  data: Optional[Data] = None
44
- """Response payload for creating or updating a monitor."""
45
44
 
46
45
  message: Optional[str] = None
47
46
  """The accompanying message for the request.
@@ -13,7 +13,7 @@ class DefendCreateWorkflowParams(TypedDict, total=False):
13
13
  """
14
14
  The action used to improve outputs that fail one or guardrail metrics for the
15
15
  workflow events. May be `regenerate`, `fixit`, or null which represents “do
16
- nothing”. ReGen runs the user's exact input prompt with minor induced variance.
16
+ nothing”. Regenerate runs the user's input prompt with minor induced variance.
17
17
  Fixit attempts to directly address the shortcomings of the output using the
18
18
  guardrail failure rationale. Do nothing does not attempt any improvement.
19
19
  """
@@ -26,7 +26,7 @@ class DefendResponse(BaseModel):
26
26
  """
27
27
  The action used to improve outputs that fail one or more guardrail metrics for
28
28
  the workflow events. May be `regenerate`, `fixit`, or null which represents “do
29
- nothing”. ReGen runs the user's exact input prompt with minor induced variance.
29
+ nothing”. Regenerate runs the user's input prompt with minor induced variance.
30
30
  Fixit attempts to directly address the shortcomings of the output using the
31
31
  guardrail failure rationale. Do nothing does not attempt any improvement.
32
32
  """
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Literal, TypedDict
5
+ from typing_extensions import TypedDict
6
6
 
7
7
  __all__ = ["DefendUpdateWorkflowParams"]
8
8
 
@@ -13,6 +13,3 @@ class DefendUpdateWorkflowParams(TypedDict, total=False):
13
13
 
14
14
  name: str
15
15
  """Name of the workflow."""
16
-
17
- type: Literal["automatic", "custom"]
18
- """Type of thresholds to use for the workflow, either `automatic` or `custom`."""
@@ -72,7 +72,6 @@ class MonitorRetrieveResponse(BaseModel):
72
72
  """Represents whether the request was completed successfully."""
73
73
 
74
74
  data: Optional[Data] = None
75
- """Detailed response payload for retrieving a monitor and its evaluations."""
76
75
 
77
76
  message: Optional[str] = None
78
77
  """The accompanying message for the request.
@@ -27,7 +27,6 @@ class MonitorSubmitEventResponse(BaseModel):
27
27
  """Represents whether the request was completed successfully."""
28
28
 
29
29
  data: Optional[Data] = None
30
- """Response payload for monitor event operations."""
31
30
 
32
31
  message: Optional[str] = None
33
32
  """The accompanying message for the request.
@@ -264,7 +264,6 @@ class TestDefend:
264
264
  workflow_id="workflow_id",
265
265
  description="description",
266
266
  name="name",
267
- type="automatic",
268
267
  )
269
268
  assert_matches_type(DefendResponse, defend, path=["response"])
270
269
 
@@ -552,7 +551,6 @@ class TestAsyncDefend:
552
551
  workflow_id="workflow_id",
553
552
  description="description",
554
553
  name="name",
555
- type="automatic",
556
554
  )
557
555
  assert_matches_type(DefendResponse, defend, path=["response"])
558
556
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.2.0"
3
- }
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