deeprails 1.6.1__py3-none-any.whl → 1.7.0__py3-none-any.whl
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.
- deeprails/_version.py +1 -1
- deeprails/resources/defend.py +43 -43
- deeprails/resources/evaluate.py +2 -2
- deeprails/resources/monitor.py +2 -2
- deeprails/types/defend_create_workflow_params.py +19 -19
- deeprails/types/defend_response.py +8 -8
- deeprails/types/defend_submit_event_params.py +2 -2
- deeprails/types/evaluate_create_params.py +2 -2
- deeprails/types/evaluation.py +2 -2
- deeprails/types/monitor_submit_event_params.py +1 -1
- {deeprails-1.6.1.dist-info → deeprails-1.7.0.dist-info}/METADATA +1 -33
- {deeprails-1.6.1.dist-info → deeprails-1.7.0.dist-info}/RECORD +14 -14
- {deeprails-1.6.1.dist-info → deeprails-1.7.0.dist-info}/WHEEL +0 -0
- {deeprails-1.6.1.dist-info → deeprails-1.7.0.dist-info}/licenses/LICENSE +0 -0
deeprails/_version.py
CHANGED
deeprails/resources/defend.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -48,13 +48,13 @@ class DefendResource(SyncAPIResource):
|
|
|
48
48
|
def create_workflow(
|
|
49
49
|
self,
|
|
50
50
|
*,
|
|
51
|
-
improvement_action:
|
|
52
|
-
metrics: Dict[str, float],
|
|
51
|
+
improvement_action: Literal["regen", "fixit", "do_nothing"],
|
|
53
52
|
name: str,
|
|
54
53
|
type: Literal["automatic", "custom"],
|
|
55
|
-
|
|
54
|
+
automatic_hallucination_tolerance_levels: Dict[str, Literal["low", "medium", "high"]] | Omit = omit,
|
|
55
|
+
custom_hallucination_threshold_values: Dict[str, float] | Omit = omit,
|
|
56
56
|
description: str | Omit = omit,
|
|
57
|
-
|
|
57
|
+
max_improvement_attempt: int | Omit = omit,
|
|
58
58
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
59
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
60
|
extra_headers: Headers | None = None,
|
|
@@ -68,16 +68,10 @@ class DefendResource(SyncAPIResource):
|
|
|
68
68
|
|
|
69
69
|
Args:
|
|
70
70
|
improvement_action: The action used to improve outputs that fail one or guardrail metrics for the
|
|
71
|
-
workflow events. May be `
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
metrics: Mapping of guardrail metrics to floating point threshold values. If the workflow
|
|
77
|
-
type is automatic, only the metric names are used (`automatic_tolerance`
|
|
78
|
-
determines thresholds). Possible metrics are `correctness`, `completeness`,
|
|
79
|
-
`instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or
|
|
80
|
-
`comprehensive_safety`.
|
|
71
|
+
workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the user's
|
|
72
|
+
input prompt with minor induced variance. FixIt attempts to directly address the
|
|
73
|
+
shortcomings of the output using the guardrail failure rationale. Do Nothing
|
|
74
|
+
does not attempt any improvement.
|
|
81
75
|
|
|
82
76
|
name: Name of the workflow.
|
|
83
77
|
|
|
@@ -87,12 +81,18 @@ class DefendResource(SyncAPIResource):
|
|
|
87
81
|
set the threshold for each metric as a floating point number between 0.0 and
|
|
88
82
|
1.0.
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
`
|
|
84
|
+
automatic_hallucination_tolerance_levels: Mapping of guardrail metrics to hallucination tolerance levels (either `low`,
|
|
85
|
+
`medium`, or `high`). Possible metrics are `completeness`,
|
|
86
|
+
`instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or
|
|
87
|
+
`comprehensive_safety`.
|
|
88
|
+
|
|
89
|
+
custom_hallucination_threshold_values: Mapping of guardrail metrics to floating point threshold values. Possible
|
|
90
|
+
metrics are `correctness`, `completeness`, `instruction_adherence`,
|
|
91
|
+
`context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.
|
|
92
92
|
|
|
93
93
|
description: Description for the workflow.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
max_improvement_attempt: Max. number of improvement action retries until a given event passes the
|
|
96
96
|
guardrails. Defaults to 10.
|
|
97
97
|
|
|
98
98
|
extra_headers: Send extra headers
|
|
@@ -108,12 +108,12 @@ class DefendResource(SyncAPIResource):
|
|
|
108
108
|
body=maybe_transform(
|
|
109
109
|
{
|
|
110
110
|
"improvement_action": improvement_action,
|
|
111
|
-
"metrics": metrics,
|
|
112
111
|
"name": name,
|
|
113
112
|
"type": type,
|
|
114
|
-
"
|
|
113
|
+
"automatic_hallucination_tolerance_levels": automatic_hallucination_tolerance_levels,
|
|
114
|
+
"custom_hallucination_threshold_values": custom_hallucination_threshold_values,
|
|
115
115
|
"description": description,
|
|
116
|
-
"
|
|
116
|
+
"max_improvement_attempt": max_improvement_attempt,
|
|
117
117
|
},
|
|
118
118
|
defend_create_workflow_params.DefendCreateWorkflowParams,
|
|
119
119
|
),
|
|
@@ -214,7 +214,7 @@ class DefendResource(SyncAPIResource):
|
|
|
214
214
|
|
|
215
215
|
Args:
|
|
216
216
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
217
|
-
contain at least
|
|
217
|
+
contain at least `user_prompt` or `system_prompt` field. For
|
|
218
218
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
219
219
|
|
|
220
220
|
model_output: Output generated by the LLM to be evaluated.
|
|
@@ -326,13 +326,13 @@ class AsyncDefendResource(AsyncAPIResource):
|
|
|
326
326
|
async def create_workflow(
|
|
327
327
|
self,
|
|
328
328
|
*,
|
|
329
|
-
improvement_action:
|
|
330
|
-
metrics: Dict[str, float],
|
|
329
|
+
improvement_action: Literal["regen", "fixit", "do_nothing"],
|
|
331
330
|
name: str,
|
|
332
331
|
type: Literal["automatic", "custom"],
|
|
333
|
-
|
|
332
|
+
automatic_hallucination_tolerance_levels: Dict[str, Literal["low", "medium", "high"]] | Omit = omit,
|
|
333
|
+
custom_hallucination_threshold_values: Dict[str, float] | Omit = omit,
|
|
334
334
|
description: str | Omit = omit,
|
|
335
|
-
|
|
335
|
+
max_improvement_attempt: int | Omit = omit,
|
|
336
336
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
337
337
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
338
338
|
extra_headers: Headers | None = None,
|
|
@@ -346,16 +346,10 @@ class AsyncDefendResource(AsyncAPIResource):
|
|
|
346
346
|
|
|
347
347
|
Args:
|
|
348
348
|
improvement_action: The action used to improve outputs that fail one or guardrail metrics for the
|
|
349
|
-
workflow events. May be `
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
metrics: Mapping of guardrail metrics to floating point threshold values. If the workflow
|
|
355
|
-
type is automatic, only the metric names are used (`automatic_tolerance`
|
|
356
|
-
determines thresholds). Possible metrics are `correctness`, `completeness`,
|
|
357
|
-
`instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or
|
|
358
|
-
`comprehensive_safety`.
|
|
349
|
+
workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the user's
|
|
350
|
+
input prompt with minor induced variance. FixIt attempts to directly address the
|
|
351
|
+
shortcomings of the output using the guardrail failure rationale. Do Nothing
|
|
352
|
+
does not attempt any improvement.
|
|
359
353
|
|
|
360
354
|
name: Name of the workflow.
|
|
361
355
|
|
|
@@ -365,12 +359,18 @@ class AsyncDefendResource(AsyncAPIResource):
|
|
|
365
359
|
set the threshold for each metric as a floating point number between 0.0 and
|
|
366
360
|
1.0.
|
|
367
361
|
|
|
368
|
-
|
|
369
|
-
`
|
|
362
|
+
automatic_hallucination_tolerance_levels: Mapping of guardrail metrics to hallucination tolerance levels (either `low`,
|
|
363
|
+
`medium`, or `high`). Possible metrics are `completeness`,
|
|
364
|
+
`instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or
|
|
365
|
+
`comprehensive_safety`.
|
|
366
|
+
|
|
367
|
+
custom_hallucination_threshold_values: Mapping of guardrail metrics to floating point threshold values. Possible
|
|
368
|
+
metrics are `correctness`, `completeness`, `instruction_adherence`,
|
|
369
|
+
`context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.
|
|
370
370
|
|
|
371
371
|
description: Description for the workflow.
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
max_improvement_attempt: Max. number of improvement action retries until a given event passes the
|
|
374
374
|
guardrails. Defaults to 10.
|
|
375
375
|
|
|
376
376
|
extra_headers: Send extra headers
|
|
@@ -386,12 +386,12 @@ class AsyncDefendResource(AsyncAPIResource):
|
|
|
386
386
|
body=await async_maybe_transform(
|
|
387
387
|
{
|
|
388
388
|
"improvement_action": improvement_action,
|
|
389
|
-
"metrics": metrics,
|
|
390
389
|
"name": name,
|
|
391
390
|
"type": type,
|
|
392
|
-
"
|
|
391
|
+
"automatic_hallucination_tolerance_levels": automatic_hallucination_tolerance_levels,
|
|
392
|
+
"custom_hallucination_threshold_values": custom_hallucination_threshold_values,
|
|
393
393
|
"description": description,
|
|
394
|
-
"
|
|
394
|
+
"max_improvement_attempt": max_improvement_attempt,
|
|
395
395
|
},
|
|
396
396
|
defend_create_workflow_params.DefendCreateWorkflowParams,
|
|
397
397
|
),
|
|
@@ -492,7 +492,7 @@ class AsyncDefendResource(AsyncAPIResource):
|
|
|
492
492
|
|
|
493
493
|
Args:
|
|
494
494
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
495
|
-
contain at least
|
|
495
|
+
contain at least `user_prompt` or `system_prompt` field. For
|
|
496
496
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
497
497
|
|
|
498
498
|
model_output: Output generated by the LLM to be evaluated.
|
deeprails/resources/evaluate.py
CHANGED
|
@@ -76,7 +76,7 @@ class EvaluateResource(SyncAPIResource):
|
|
|
76
76
|
|
|
77
77
|
Args:
|
|
78
78
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
79
|
-
contain at least
|
|
79
|
+
contain at least `user_prompt` or `system_prompt` field. For
|
|
80
80
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
81
81
|
|
|
82
82
|
model_output: Output generated by the LLM to be evaluated.
|
|
@@ -207,7 +207,7 @@ class AsyncEvaluateResource(AsyncAPIResource):
|
|
|
207
207
|
|
|
208
208
|
Args:
|
|
209
209
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
210
|
-
contain at least
|
|
210
|
+
contain at least `user_prompt` or `system_prompt` field. For
|
|
211
211
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
212
212
|
|
|
213
213
|
model_output: Output generated by the LLM to be evaluated.
|
deeprails/resources/monitor.py
CHANGED
|
@@ -220,7 +220,7 @@ class MonitorResource(SyncAPIResource):
|
|
|
220
220
|
`ground_truth_adherence`, and/or `comprehensive_safety`.
|
|
221
221
|
|
|
222
222
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
223
|
-
contain at least
|
|
223
|
+
contain at least a `user_prompt` or `system_prompt` field. For
|
|
224
224
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
225
225
|
|
|
226
226
|
model_output: Output generated by the LLM to be evaluated.
|
|
@@ -458,7 +458,7 @@ class AsyncMonitorResource(AsyncAPIResource):
|
|
|
458
458
|
`ground_truth_adherence`, and/or `comprehensive_safety`.
|
|
459
459
|
|
|
460
460
|
model_input: A dictionary of inputs sent to the LLM to generate output. The dictionary must
|
|
461
|
-
contain at least
|
|
461
|
+
contain at least a `user_prompt` or `system_prompt` field. For
|
|
462
462
|
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
463
463
|
|
|
464
464
|
model_output: Output generated by the LLM to be evaluated.
|
|
@@ -2,29 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict
|
|
6
6
|
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["DefendCreateWorkflowParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class DefendCreateWorkflowParams(TypedDict, total=False):
|
|
12
|
-
improvement_action: Required[
|
|
12
|
+
improvement_action: Required[Literal["regen", "fixit", "do_nothing"]]
|
|
13
13
|
"""
|
|
14
14
|
The action used to improve outputs that fail one or guardrail metrics for the
|
|
15
|
-
workflow events. May be `
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
metrics: Required[Dict[str, float]]
|
|
22
|
-
"""Mapping of guardrail metrics to floating point threshold values.
|
|
23
|
-
|
|
24
|
-
If the workflow type is automatic, only the metric names are used
|
|
25
|
-
(`automatic_tolerance` determines thresholds). Possible metrics are
|
|
26
|
-
`correctness`, `completeness`, `instruction_adherence`, `context_adherence`,
|
|
27
|
-
`ground_truth_adherence`, or `comprehensive_safety`.
|
|
15
|
+
workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the user's
|
|
16
|
+
input prompt with minor induced variance. FixIt attempts to directly address the
|
|
17
|
+
shortcomings of the output using the guardrail failure rationale. Do Nothing
|
|
18
|
+
does not attempt any improvement.
|
|
28
19
|
"""
|
|
29
20
|
|
|
30
21
|
name: Required[str]
|
|
@@ -39,16 +30,25 @@ class DefendCreateWorkflowParams(TypedDict, total=False):
|
|
|
39
30
|
1.0.
|
|
40
31
|
"""
|
|
41
32
|
|
|
42
|
-
|
|
33
|
+
automatic_hallucination_tolerance_levels: Dict[str, Literal["low", "medium", "high"]]
|
|
43
34
|
"""
|
|
44
|
-
|
|
45
|
-
`
|
|
35
|
+
Mapping of guardrail metrics to hallucination tolerance levels (either `low`,
|
|
36
|
+
`medium`, or `high`). Possible metrics are `completeness`,
|
|
37
|
+
`instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or
|
|
38
|
+
`comprehensive_safety`.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
custom_hallucination_threshold_values: Dict[str, float]
|
|
42
|
+
"""Mapping of guardrail metrics to floating point threshold values.
|
|
43
|
+
|
|
44
|
+
Possible metrics are `correctness`, `completeness`, `instruction_adherence`,
|
|
45
|
+
`context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
description: str
|
|
49
49
|
"""Description for the workflow."""
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
max_improvement_attempt: int
|
|
52
52
|
"""Max.
|
|
53
53
|
|
|
54
54
|
number of improvement action retries until a given event passes the guardrails.
|
|
@@ -22,16 +22,16 @@ class DefendResponse(BaseModel):
|
|
|
22
22
|
description: Optional[str] = None
|
|
23
23
|
"""Description for the workflow."""
|
|
24
24
|
|
|
25
|
-
improvement_action: Optional[Literal["
|
|
25
|
+
improvement_action: Optional[Literal["regen", "fixit", "do_nothing"]] = None
|
|
26
26
|
"""
|
|
27
27
|
The action used to improve outputs that fail one or more guardrail metrics for
|
|
28
|
-
the workflow events. May be `
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
the workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the
|
|
29
|
+
user's input prompt with minor induced variance. FixIt attempts to directly
|
|
30
|
+
address the shortcomings of the output using the guardrail failure rationale. Do
|
|
31
|
+
Nothing does not attempt any improvement.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
max_improvement_attempt: Optional[int] = None
|
|
35
35
|
"""Max.
|
|
36
36
|
|
|
37
37
|
number of improvement action retries until a given event passes the guardrails.
|
|
@@ -40,10 +40,10 @@ class DefendResponse(BaseModel):
|
|
|
40
40
|
modified_at: Optional[datetime] = None
|
|
41
41
|
"""The most recent time the workflow was modified in UTC."""
|
|
42
42
|
|
|
43
|
-
status: Optional[Literal["
|
|
43
|
+
status: Optional[Literal["inactive", "active"]] = None
|
|
44
44
|
"""Status of the selected workflow.
|
|
45
45
|
|
|
46
|
-
May be `
|
|
46
|
+
May be `inactive` or `active`. Inactive workflows will not accept events.
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
success_rate: Optional[float] = None
|
|
@@ -11,8 +11,8 @@ class DefendSubmitEventParams(TypedDict, total=False):
|
|
|
11
11
|
model_input: Required[ModelInput]
|
|
12
12
|
"""A dictionary of inputs sent to the LLM to generate output.
|
|
13
13
|
|
|
14
|
-
The dictionary must contain at least
|
|
15
|
-
|
|
14
|
+
The dictionary must contain at least `user_prompt` or `system_prompt` field. For
|
|
15
|
+
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
model_output: Required[str]
|
|
@@ -12,8 +12,8 @@ class EvaluateCreateParams(TypedDict, total=False):
|
|
|
12
12
|
model_input: Required[ModelInput]
|
|
13
13
|
"""A dictionary of inputs sent to the LLM to generate output.
|
|
14
14
|
|
|
15
|
-
The dictionary must contain at least
|
|
16
|
-
|
|
15
|
+
The dictionary must contain at least `user_prompt` or `system_prompt` field. For
|
|
16
|
+
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
19
|
model_output: Required[str]
|
deeprails/types/evaluation.py
CHANGED
|
@@ -32,8 +32,8 @@ class Evaluation(BaseModel):
|
|
|
32
32
|
api_model_input: ModelInput = FieldInfo(alias="model_input")
|
|
33
33
|
"""A dictionary of inputs sent to the LLM to generate output.
|
|
34
34
|
|
|
35
|
-
The dictionary must contain at least
|
|
36
|
-
|
|
35
|
+
The dictionary must contain at least `user_prompt` or `system_prompt` field. For
|
|
36
|
+
ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
api_model_output: str = FieldInfo(alias="model_output")
|
|
@@ -31,7 +31,7 @@ class MonitorSubmitEventParams(TypedDict, total=False):
|
|
|
31
31
|
model_input: Required[ModelInput]
|
|
32
32
|
"""A dictionary of inputs sent to the LLM to generate output.
|
|
33
33
|
|
|
34
|
-
The dictionary must contain at least
|
|
34
|
+
The dictionary must contain at least a `user_prompt` or `system_prompt` field.
|
|
35
35
|
For ground_truth_aherence guadrail metric, `ground_truth` should be provided.
|
|
36
36
|
"""
|
|
37
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: deeprails
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.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
|
|
@@ -67,10 +67,6 @@ client = Deeprails(
|
|
|
67
67
|
|
|
68
68
|
defend_response = client.defend.create_workflow(
|
|
69
69
|
improvement_action="fixit",
|
|
70
|
-
metrics={
|
|
71
|
-
"completeness": 0.7,
|
|
72
|
-
"instruction_adherence": 0.75,
|
|
73
|
-
},
|
|
74
70
|
name="Push Alert Workflow",
|
|
75
71
|
type="custom",
|
|
76
72
|
)
|
|
@@ -99,10 +95,6 @@ client = AsyncDeeprails(
|
|
|
99
95
|
async def main() -> None:
|
|
100
96
|
defend_response = await client.defend.create_workflow(
|
|
101
97
|
improvement_action="fixit",
|
|
102
|
-
metrics={
|
|
103
|
-
"completeness": 0.7,
|
|
104
|
-
"instruction_adherence": 0.75,
|
|
105
|
-
},
|
|
106
98
|
name="Push Alert Workflow",
|
|
107
99
|
type="custom",
|
|
108
100
|
)
|
|
@@ -140,10 +132,6 @@ async def main() -> None:
|
|
|
140
132
|
) as client:
|
|
141
133
|
defend_response = await client.defend.create_workflow(
|
|
142
134
|
improvement_action="fixit",
|
|
143
|
-
metrics={
|
|
144
|
-
"completeness": 0.7,
|
|
145
|
-
"instruction_adherence": 0.75,
|
|
146
|
-
},
|
|
147
135
|
name="Push Alert Workflow",
|
|
148
136
|
type="custom",
|
|
149
137
|
)
|
|
@@ -199,10 +187,6 @@ client = Deeprails()
|
|
|
199
187
|
try:
|
|
200
188
|
client.defend.create_workflow(
|
|
201
189
|
improvement_action="fixit",
|
|
202
|
-
metrics={
|
|
203
|
-
"completeness": 0.7,
|
|
204
|
-
"instruction_adherence": 0.75,
|
|
205
|
-
},
|
|
206
190
|
name="Push Alert Workflow",
|
|
207
191
|
type="custom",
|
|
208
192
|
)
|
|
@@ -250,10 +234,6 @@ client = Deeprails(
|
|
|
250
234
|
# Or, configure per-request:
|
|
251
235
|
client.with_options(max_retries=5).defend.create_workflow(
|
|
252
236
|
improvement_action="fixit",
|
|
253
|
-
metrics={
|
|
254
|
-
"completeness": 0.7,
|
|
255
|
-
"instruction_adherence": 0.75,
|
|
256
|
-
},
|
|
257
237
|
name="Push Alert Workflow",
|
|
258
238
|
type="custom",
|
|
259
239
|
)
|
|
@@ -281,10 +261,6 @@ client = Deeprails(
|
|
|
281
261
|
# Override per-request:
|
|
282
262
|
client.with_options(timeout=5.0).defend.create_workflow(
|
|
283
263
|
improvement_action="fixit",
|
|
284
|
-
metrics={
|
|
285
|
-
"completeness": 0.7,
|
|
286
|
-
"instruction_adherence": 0.75,
|
|
287
|
-
},
|
|
288
264
|
name="Push Alert Workflow",
|
|
289
265
|
type="custom",
|
|
290
266
|
)
|
|
@@ -330,10 +306,6 @@ from deeprails import Deeprails
|
|
|
330
306
|
client = Deeprails()
|
|
331
307
|
response = client.defend.with_raw_response.create_workflow(
|
|
332
308
|
improvement_action="fixit",
|
|
333
|
-
metrics={
|
|
334
|
-
"completeness": 0.7,
|
|
335
|
-
"instruction_adherence": 0.75,
|
|
336
|
-
},
|
|
337
309
|
name="Push Alert Workflow",
|
|
338
310
|
type="custom",
|
|
339
311
|
)
|
|
@@ -356,10 +328,6 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
356
328
|
```python
|
|
357
329
|
with client.defend.with_streaming_response.create_workflow(
|
|
358
330
|
improvement_action="fixit",
|
|
359
|
-
metrics={
|
|
360
|
-
"completeness": 0.7,
|
|
361
|
-
"instruction_adherence": 0.75,
|
|
362
|
-
},
|
|
363
331
|
name="Push Alert Workflow",
|
|
364
332
|
type="custom",
|
|
365
333
|
) as response:
|
|
@@ -11,7 +11,7 @@ deeprails/_resource.py,sha256=7RXX5KZr4j0TIE66vnduHp7p9Yf9X0FyDDECuvRHARg,1118
|
|
|
11
11
|
deeprails/_response.py,sha256=yj0HJDU91WPpiczwi6CBOLAl_bqf4I_I96vWMAwx6Fg,28806
|
|
12
12
|
deeprails/_streaming.py,sha256=hCp5bK9dyw2TyrVL69m-6qGC-QtGYwhXmFzITCWPgAs,10112
|
|
13
13
|
deeprails/_types.py,sha256=XR3mad9NsGqZsjrd1VVJ657-4O4kwyw9Qzg4M3i6Vh0,7239
|
|
14
|
-
deeprails/_version.py,sha256=
|
|
14
|
+
deeprails/_version.py,sha256=YHKK91JaYK_no60ap2JlKWyIwHFkmLObGPVTl_njTPk,161
|
|
15
15
|
deeprails/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
deeprails/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
deeprails/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -27,25 +27,25 @@ deeprails/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4
|
|
|
27
27
|
deeprails/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
|
|
28
28
|
deeprails/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
29
29
|
deeprails/resources/__init__.py,sha256=ha0jL9Et8fHzPdkTa7ecihYapOC4I6O-PHf2X9igprE,1491
|
|
30
|
-
deeprails/resources/defend.py,sha256=
|
|
31
|
-
deeprails/resources/evaluate.py,sha256=
|
|
32
|
-
deeprails/resources/monitor.py,sha256=
|
|
30
|
+
deeprails/resources/defend.py,sha256=wN1AvMBo1E6fIkVUQJn_xykL5SeZ2B7THGyxiXDcbig,28146
|
|
31
|
+
deeprails/resources/evaluate.py,sha256=i0uZZHab7A0THAvhsGPxyiNSZt3_s7CLyW7tR_PLaT4,13001
|
|
32
|
+
deeprails/resources/monitor.py,sha256=OVG0fIZF1ztN2ABtQXjjGKGPd2-5fyCxXAaSIO7j0bQ,22513
|
|
33
33
|
deeprails/types/__init__.py,sha256=tLO-5DMMKt-F4qQYht3F-RFgLbthP-8a36853IhNoGI,1267
|
|
34
34
|
deeprails/types/api_response.py,sha256=eHEQeL677tvm1RK0A_S03EAoprQbJzmHspiKrtjKRt4,1232
|
|
35
|
-
deeprails/types/defend_create_workflow_params.py,sha256=
|
|
36
|
-
deeprails/types/defend_response.py,sha256=
|
|
37
|
-
deeprails/types/defend_submit_event_params.py,sha256=
|
|
35
|
+
deeprails/types/defend_create_workflow_params.py,sha256=b2wWr-DtON4XcbPyKD45oO7016F4ji5LoIqyNdM3B5k,2101
|
|
36
|
+
deeprails/types/defend_response.py,sha256=sIS9nBgW2a_yBYxVWo33pgy1IKEn-m4AzamOr5Eov5g,1602
|
|
37
|
+
deeprails/types/defend_submit_event_params.py,sha256=zT_Jf6wfb7P_e67CqrbI34ys6JxLbLbydRdSb_Ylx80,1515
|
|
38
38
|
deeprails/types/defend_update_workflow_params.py,sha256=QH2k7EDMLub3mW1lPV5SUoKDHW_T2arSo-RGHLterwo,373
|
|
39
|
-
deeprails/types/evaluate_create_params.py,sha256=
|
|
40
|
-
deeprails/types/evaluation.py,sha256=
|
|
39
|
+
deeprails/types/evaluate_create_params.py,sha256=12xRsjf8SyfWxcxIk6Rs7DSMDN8wGlNWQm015UBJifI,1985
|
|
40
|
+
deeprails/types/evaluation.py,sha256=XKXmzQfKcCzrYH3BoFYxl_46M04MUQZTh0rAKLmtN-Q,3312
|
|
41
41
|
deeprails/types/monitor_create_params.py,sha256=kTSj-PhuzpT-HPDTQJemRWfd8w32foUMH9FQZj8symk,384
|
|
42
42
|
deeprails/types/monitor_retrieve_params.py,sha256=PEsRmbd-81z4pJvhfi4JbrQWNzmeiLkoNsTUoPZ6kFY,352
|
|
43
43
|
deeprails/types/monitor_retrieve_response.py,sha256=BZp7-6PFVdqYU5ZDhbr1Eao3kU132zTm9idgoaA65Gg,2245
|
|
44
|
-
deeprails/types/monitor_submit_event_params.py,sha256=
|
|
44
|
+
deeprails/types/monitor_submit_event_params.py,sha256=xIiZxkYz-uuAy1AQb7SY5MD3r38L5p5IUE14gf-g8xU,2150
|
|
45
45
|
deeprails/types/monitor_submit_event_response.py,sha256=qlraxIJaclNSR_JOizMPj9gOiz-0x7lIChSX3DmFllM,867
|
|
46
46
|
deeprails/types/monitor_update_params.py,sha256=gJyFFxT_u_iWABknuKnLpPl9r-VPfCcGtOAmh6sPwUw,550
|
|
47
47
|
deeprails/types/workflow_event_response.py,sha256=mIzOCnYJg4TDSq_tG_0WfA0_Gmc9-0q-befyookfUFM,867
|
|
48
|
-
deeprails-1.
|
|
49
|
-
deeprails-1.
|
|
50
|
-
deeprails-1.
|
|
51
|
-
deeprails-1.
|
|
48
|
+
deeprails-1.7.0.dist-info/METADATA,sha256=8aWnlEA5RbZSFo-JgYs0ZJaUExVdgWNprA91lBgiJ4M,11064
|
|
49
|
+
deeprails-1.7.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
50
|
+
deeprails-1.7.0.dist-info/licenses/LICENSE,sha256=rFTxPcYE516UQLju2SCY1r2pSDDfodL0-ZvxF_fgueg,11339
|
|
51
|
+
deeprails-1.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|