orq-ai-sdk 4.2.0rc28__py3-none-any.whl → 4.2.6__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.
- orq_ai_sdk/_hooks/globalhook.py +0 -1
- orq_ai_sdk/_version.py +3 -3
- orq_ai_sdk/audio.py +30 -0
- orq_ai_sdk/basesdk.py +20 -6
- orq_ai_sdk/chat.py +22 -0
- orq_ai_sdk/completions.py +332 -0
- orq_ai_sdk/contacts.py +43 -855
- orq_ai_sdk/deployments.py +61 -0
- orq_ai_sdk/edits.py +258 -0
- orq_ai_sdk/embeddings.py +238 -0
- orq_ai_sdk/generations.py +272 -0
- orq_ai_sdk/identities.py +1037 -0
- orq_ai_sdk/images.py +28 -0
- orq_ai_sdk/models/__init__.py +5341 -737
- orq_ai_sdk/models/actionreviewedstreamingevent.py +18 -1
- orq_ai_sdk/models/actionreviewrequestedstreamingevent.py +44 -1
- orq_ai_sdk/models/agenterroredstreamingevent.py +18 -1
- orq_ai_sdk/models/agentinactivestreamingevent.py +168 -70
- orq_ai_sdk/models/agentmessagecreatedstreamingevent.py +18 -2
- orq_ai_sdk/models/agentresponsemessage.py +18 -2
- orq_ai_sdk/models/agentstartedstreamingevent.py +127 -2
- orq_ai_sdk/models/agentthoughtstreamingevent.py +178 -211
- orq_ai_sdk/models/conversationresponse.py +31 -20
- orq_ai_sdk/models/conversationwithmessagesresponse.py +31 -20
- orq_ai_sdk/models/createagentrequestop.py +1922 -384
- orq_ai_sdk/models/createagentresponse.py +147 -91
- orq_ai_sdk/models/createagentresponserequestop.py +111 -2
- orq_ai_sdk/models/createchatcompletionop.py +1375 -861
- orq_ai_sdk/models/createchunkop.py +46 -19
- orq_ai_sdk/models/createcompletionop.py +1890 -0
- orq_ai_sdk/models/createcontactop.py +45 -56
- orq_ai_sdk/models/createconversationop.py +61 -39
- orq_ai_sdk/models/createconversationresponseop.py +68 -4
- orq_ai_sdk/models/createdatasetitemop.py +424 -80
- orq_ai_sdk/models/createdatasetop.py +19 -2
- orq_ai_sdk/models/createdatasourceop.py +92 -26
- orq_ai_sdk/models/createembeddingop.py +384 -0
- orq_ai_sdk/models/createevalop.py +552 -24
- orq_ai_sdk/models/createidentityop.py +176 -0
- orq_ai_sdk/models/createimageeditop.py +504 -0
- orq_ai_sdk/models/createimageop.py +208 -117
- orq_ai_sdk/models/createimagevariationop.py +486 -0
- orq_ai_sdk/models/createknowledgeop.py +186 -121
- orq_ai_sdk/models/creatememorydocumentop.py +50 -1
- orq_ai_sdk/models/creatememoryop.py +34 -21
- orq_ai_sdk/models/creatememorystoreop.py +34 -1
- orq_ai_sdk/models/createmoderationop.py +521 -0
- orq_ai_sdk/models/createpromptop.py +2748 -1252
- orq_ai_sdk/models/creatererankop.py +416 -0
- orq_ai_sdk/models/createresponseop.py +2567 -0
- orq_ai_sdk/models/createspeechop.py +316 -0
- orq_ai_sdk/models/createtoolop.py +537 -12
- orq_ai_sdk/models/createtranscriptionop.py +562 -0
- orq_ai_sdk/models/createtranslationop.py +540 -0
- orq_ai_sdk/models/datapart.py +18 -1
- orq_ai_sdk/models/deletechunksop.py +34 -1
- orq_ai_sdk/models/{deletecontactop.py → deleteidentityop.py} +9 -9
- orq_ai_sdk/models/deletepromptop.py +26 -0
- orq_ai_sdk/models/deploymentcreatemetricop.py +362 -76
- orq_ai_sdk/models/deploymentgetconfigop.py +635 -194
- orq_ai_sdk/models/deploymentinvokeop.py +168 -173
- orq_ai_sdk/models/deploymentsop.py +195 -58
- orq_ai_sdk/models/deploymentstreamop.py +652 -304
- orq_ai_sdk/models/errorpart.py +18 -1
- orq_ai_sdk/models/filecontentpartschema.py +18 -1
- orq_ai_sdk/models/filegetop.py +19 -2
- orq_ai_sdk/models/filelistop.py +35 -2
- orq_ai_sdk/models/filepart.py +50 -1
- orq_ai_sdk/models/fileuploadop.py +51 -2
- orq_ai_sdk/models/generateconversationnameop.py +31 -20
- orq_ai_sdk/models/get_v2_evaluators_id_versionsop.py +34 -1
- orq_ai_sdk/models/get_v2_tools_tool_id_versions_version_id_op.py +18 -1
- orq_ai_sdk/models/get_v2_tools_tool_id_versionsop.py +34 -1
- orq_ai_sdk/models/getallmemoriesop.py +34 -21
- orq_ai_sdk/models/getallmemorydocumentsop.py +42 -1
- orq_ai_sdk/models/getallmemorystoresop.py +34 -1
- orq_ai_sdk/models/getallpromptsop.py +1690 -230
- orq_ai_sdk/models/getalltoolsop.py +325 -8
- orq_ai_sdk/models/getchunkscountop.py +34 -1
- orq_ai_sdk/models/getevalsop.py +395 -43
- orq_ai_sdk/models/getonechunkop.py +14 -19
- orq_ai_sdk/models/getoneknowledgeop.py +116 -96
- orq_ai_sdk/models/getonepromptop.py +1673 -230
- orq_ai_sdk/models/getpromptversionop.py +1670 -216
- orq_ai_sdk/models/imagecontentpartschema.py +50 -1
- orq_ai_sdk/models/internal/globals.py +18 -1
- orq_ai_sdk/models/invokeagentop.py +140 -2
- orq_ai_sdk/models/invokedeploymentrequest.py +418 -80
- orq_ai_sdk/models/invokeevalop.py +160 -131
- orq_ai_sdk/models/listagentsop.py +793 -166
- orq_ai_sdk/models/listchunksop.py +32 -19
- orq_ai_sdk/models/listchunkspaginatedop.py +46 -19
- orq_ai_sdk/models/listconversationsop.py +18 -1
- orq_ai_sdk/models/listdatasetdatapointsop.py +252 -42
- orq_ai_sdk/models/listdatasetsop.py +35 -2
- orq_ai_sdk/models/listdatasourcesop.py +35 -26
- orq_ai_sdk/models/{listcontactsop.py → listidentitiesop.py} +89 -79
- orq_ai_sdk/models/listknowledgebasesop.py +132 -96
- orq_ai_sdk/models/listmodelsop.py +1 -0
- orq_ai_sdk/models/listpromptversionsop.py +1684 -216
- orq_ai_sdk/models/parseop.py +161 -17
- orq_ai_sdk/models/partdoneevent.py +19 -2
- orq_ai_sdk/models/post_v2_router_ocrop.py +408 -0
- orq_ai_sdk/models/publiccontact.py +27 -4
- orq_ai_sdk/models/publicidentity.py +62 -0
- orq_ai_sdk/models/reasoningpart.py +19 -2
- orq_ai_sdk/models/refusalpartschema.py +18 -1
- orq_ai_sdk/models/remoteconfigsgetconfigop.py +34 -1
- orq_ai_sdk/models/responsedoneevent.py +114 -84
- orq_ai_sdk/models/responsestartedevent.py +18 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +787 -166
- orq_ai_sdk/models/retrievedatapointop.py +236 -42
- orq_ai_sdk/models/retrievedatasetop.py +19 -2
- orq_ai_sdk/models/retrievedatasourceop.py +17 -26
- orq_ai_sdk/models/{retrievecontactop.py → retrieveidentityop.py} +38 -41
- orq_ai_sdk/models/retrievememorydocumentop.py +18 -1
- orq_ai_sdk/models/retrievememoryop.py +18 -21
- orq_ai_sdk/models/retrievememorystoreop.py +18 -1
- orq_ai_sdk/models/retrievetoolop.py +309 -8
- orq_ai_sdk/models/runagentop.py +1451 -197
- orq_ai_sdk/models/searchknowledgeop.py +108 -1
- orq_ai_sdk/models/security.py +18 -1
- orq_ai_sdk/models/streamagentop.py +93 -2
- orq_ai_sdk/models/streamrunagentop.py +1428 -195
- orq_ai_sdk/models/textcontentpartschema.py +34 -1
- orq_ai_sdk/models/thinkingconfigenabledschema.py +18 -1
- orq_ai_sdk/models/toolcallpart.py +18 -1
- orq_ai_sdk/models/tooldoneevent.py +18 -1
- orq_ai_sdk/models/toolexecutionfailedstreamingevent.py +50 -1
- orq_ai_sdk/models/toolexecutionfinishedstreamingevent.py +34 -1
- orq_ai_sdk/models/toolexecutionstartedstreamingevent.py +34 -1
- orq_ai_sdk/models/toolresultpart.py +18 -1
- orq_ai_sdk/models/toolreviewrequestedevent.py +18 -1
- orq_ai_sdk/models/toolstartedevent.py +18 -1
- orq_ai_sdk/models/updateagentop.py +1951 -404
- orq_ai_sdk/models/updatechunkop.py +46 -19
- orq_ai_sdk/models/updateconversationop.py +61 -39
- orq_ai_sdk/models/updatedatapointop.py +424 -80
- orq_ai_sdk/models/updatedatasetop.py +51 -2
- orq_ai_sdk/models/updatedatasourceop.py +17 -26
- orq_ai_sdk/models/updateevalop.py +577 -16
- orq_ai_sdk/models/{updatecontactop.py → updateidentityop.py} +78 -68
- orq_ai_sdk/models/updateknowledgeop.py +234 -190
- orq_ai_sdk/models/updatememorydocumentop.py +50 -1
- orq_ai_sdk/models/updatememoryop.py +50 -21
- orq_ai_sdk/models/updatememorystoreop.py +66 -1
- orq_ai_sdk/models/updatepromptop.py +2844 -1450
- orq_ai_sdk/models/updatetoolop.py +592 -9
- orq_ai_sdk/models/usermessagerequest.py +18 -2
- orq_ai_sdk/moderations.py +218 -0
- orq_ai_sdk/orq_completions.py +660 -0
- orq_ai_sdk/orq_responses.py +398 -0
- orq_ai_sdk/prompts.py +28 -36
- orq_ai_sdk/rerank.py +232 -0
- orq_ai_sdk/router.py +89 -641
- orq_ai_sdk/sdk.py +3 -0
- orq_ai_sdk/speech.py +251 -0
- orq_ai_sdk/transcriptions.py +326 -0
- orq_ai_sdk/translations.py +298 -0
- orq_ai_sdk/utils/__init__.py +13 -1
- orq_ai_sdk/variations.py +254 -0
- orq_ai_sdk-4.2.6.dist-info/METADATA +888 -0
- orq_ai_sdk-4.2.6.dist-info/RECORD +263 -0
- {orq_ai_sdk-4.2.0rc28.dist-info → orq_ai_sdk-4.2.6.dist-info}/WHEEL +2 -1
- orq_ai_sdk-4.2.6.dist-info/top_level.txt +1 -0
- orq_ai_sdk-4.2.0rc28.dist-info/METADATA +0 -867
- orq_ai_sdk-4.2.0rc28.dist-info/RECORD +0 -233
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
import httpx
|
|
6
6
|
from orq_ai_sdk.models import OrqError
|
|
7
|
-
from orq_ai_sdk.types import BaseModel
|
|
7
|
+
from orq_ai_sdk.types import BaseModel, UNSET_SENTINEL
|
|
8
8
|
from orq_ai_sdk.utils import get_discriminator
|
|
9
9
|
import pydantic
|
|
10
|
-
from pydantic import Discriminator, Tag
|
|
10
|
+
from pydantic import Discriminator, Tag, model_serializer
|
|
11
11
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
13
13
|
|
|
@@ -44,6 +44,22 @@ class CreateEvalGuardrailConfigEvalsNumber(BaseModel):
|
|
|
44
44
|
|
|
45
45
|
alert_on_failure: Optional[bool] = False
|
|
46
46
|
|
|
47
|
+
@model_serializer(mode="wrap")
|
|
48
|
+
def serialize_model(self, handler):
|
|
49
|
+
optional_fields = set(["alert_on_failure"])
|
|
50
|
+
serialized = handler(self)
|
|
51
|
+
m = {}
|
|
52
|
+
|
|
53
|
+
for n, f in type(self).model_fields.items():
|
|
54
|
+
k = f.alias or n
|
|
55
|
+
val = serialized.get(k)
|
|
56
|
+
|
|
57
|
+
if val != UNSET_SENTINEL:
|
|
58
|
+
if val is not None or k not in optional_fields:
|
|
59
|
+
m[k] = val
|
|
60
|
+
|
|
61
|
+
return m
|
|
62
|
+
|
|
47
63
|
|
|
48
64
|
CreateEvalGuardrailConfigEvalsRequestRequestBody4Type = Literal["boolean",]
|
|
49
65
|
|
|
@@ -64,6 +80,22 @@ class CreateEvalGuardrailConfigEvalsBoolean(BaseModel):
|
|
|
64
80
|
|
|
65
81
|
alert_on_failure: Optional[bool] = False
|
|
66
82
|
|
|
83
|
+
@model_serializer(mode="wrap")
|
|
84
|
+
def serialize_model(self, handler):
|
|
85
|
+
optional_fields = set(["alert_on_failure"])
|
|
86
|
+
serialized = handler(self)
|
|
87
|
+
m = {}
|
|
88
|
+
|
|
89
|
+
for n, f in type(self).model_fields.items():
|
|
90
|
+
k = f.alias or n
|
|
91
|
+
val = serialized.get(k)
|
|
92
|
+
|
|
93
|
+
if val != UNSET_SENTINEL:
|
|
94
|
+
if val is not None or k not in optional_fields:
|
|
95
|
+
m[k] = val
|
|
96
|
+
|
|
97
|
+
return m
|
|
98
|
+
|
|
67
99
|
|
|
68
100
|
CreateEvalRequestBodyEvalsGuardrailConfigTypedDict = TypeAliasType(
|
|
69
101
|
"CreateEvalRequestBodyEvalsGuardrailConfigTypedDict",
|
|
@@ -129,6 +161,22 @@ class Python(BaseModel):
|
|
|
129
161
|
|
|
130
162
|
description: Optional[str] = ""
|
|
131
163
|
|
|
164
|
+
@model_serializer(mode="wrap")
|
|
165
|
+
def serialize_model(self, handler):
|
|
166
|
+
optional_fields = set(["guardrail_config", "output_type", "description"])
|
|
167
|
+
serialized = handler(self)
|
|
168
|
+
m = {}
|
|
169
|
+
|
|
170
|
+
for n, f in type(self).model_fields.items():
|
|
171
|
+
k = f.alias or n
|
|
172
|
+
val = serialized.get(k)
|
|
173
|
+
|
|
174
|
+
if val != UNSET_SENTINEL:
|
|
175
|
+
if val is not None or k not in optional_fields:
|
|
176
|
+
m[k] = val
|
|
177
|
+
|
|
178
|
+
return m
|
|
179
|
+
|
|
132
180
|
|
|
133
181
|
CreateEvalGuardrailConfigEvalsRequestRequestBody3Type = Literal["number",]
|
|
134
182
|
|
|
@@ -162,6 +210,22 @@ class CreateEvalGuardrailConfigNumber(BaseModel):
|
|
|
162
210
|
|
|
163
211
|
alert_on_failure: Optional[bool] = False
|
|
164
212
|
|
|
213
|
+
@model_serializer(mode="wrap")
|
|
214
|
+
def serialize_model(self, handler):
|
|
215
|
+
optional_fields = set(["alert_on_failure"])
|
|
216
|
+
serialized = handler(self)
|
|
217
|
+
m = {}
|
|
218
|
+
|
|
219
|
+
for n, f in type(self).model_fields.items():
|
|
220
|
+
k = f.alias or n
|
|
221
|
+
val = serialized.get(k)
|
|
222
|
+
|
|
223
|
+
if val != UNSET_SENTINEL:
|
|
224
|
+
if val is not None or k not in optional_fields:
|
|
225
|
+
m[k] = val
|
|
226
|
+
|
|
227
|
+
return m
|
|
228
|
+
|
|
165
229
|
|
|
166
230
|
CreateEvalGuardrailConfigEvalsRequestRequestBodyType = Literal["boolean",]
|
|
167
231
|
|
|
@@ -182,6 +246,22 @@ class CreateEvalGuardrailConfigBoolean(BaseModel):
|
|
|
182
246
|
|
|
183
247
|
alert_on_failure: Optional[bool] = False
|
|
184
248
|
|
|
249
|
+
@model_serializer(mode="wrap")
|
|
250
|
+
def serialize_model(self, handler):
|
|
251
|
+
optional_fields = set(["alert_on_failure"])
|
|
252
|
+
serialized = handler(self)
|
|
253
|
+
m = {}
|
|
254
|
+
|
|
255
|
+
for n, f in type(self).model_fields.items():
|
|
256
|
+
k = f.alias or n
|
|
257
|
+
val = serialized.get(k)
|
|
258
|
+
|
|
259
|
+
if val != UNSET_SENTINEL:
|
|
260
|
+
if val is not None or k not in optional_fields:
|
|
261
|
+
m[k] = val
|
|
262
|
+
|
|
263
|
+
return m
|
|
264
|
+
|
|
185
265
|
|
|
186
266
|
CreateEvalRequestBodyGuardrailConfigTypedDict = TypeAliasType(
|
|
187
267
|
"CreateEvalRequestBodyGuardrailConfigTypedDict",
|
|
@@ -267,6 +347,22 @@ class CreateEvalRequestBodyHTTP(BaseModel):
|
|
|
267
347
|
|
|
268
348
|
description: Optional[str] = ""
|
|
269
349
|
|
|
350
|
+
@model_serializer(mode="wrap")
|
|
351
|
+
def serialize_model(self, handler):
|
|
352
|
+
optional_fields = set(["guardrail_config", "output_type", "description"])
|
|
353
|
+
serialized = handler(self)
|
|
354
|
+
m = {}
|
|
355
|
+
|
|
356
|
+
for n, f in type(self).model_fields.items():
|
|
357
|
+
k = f.alias or n
|
|
358
|
+
val = serialized.get(k)
|
|
359
|
+
|
|
360
|
+
if val != UNSET_SENTINEL:
|
|
361
|
+
if val is not None or k not in optional_fields:
|
|
362
|
+
m[k] = val
|
|
363
|
+
|
|
364
|
+
return m
|
|
365
|
+
|
|
270
366
|
|
|
271
367
|
CreateEvalGuardrailConfigEvalsRequestType = Literal["number",]
|
|
272
368
|
|
|
@@ -300,6 +396,22 @@ class GuardrailConfigNumber(BaseModel):
|
|
|
300
396
|
|
|
301
397
|
alert_on_failure: Optional[bool] = False
|
|
302
398
|
|
|
399
|
+
@model_serializer(mode="wrap")
|
|
400
|
+
def serialize_model(self, handler):
|
|
401
|
+
optional_fields = set(["alert_on_failure"])
|
|
402
|
+
serialized = handler(self)
|
|
403
|
+
m = {}
|
|
404
|
+
|
|
405
|
+
for n, f in type(self).model_fields.items():
|
|
406
|
+
k = f.alias or n
|
|
407
|
+
val = serialized.get(k)
|
|
408
|
+
|
|
409
|
+
if val != UNSET_SENTINEL:
|
|
410
|
+
if val is not None or k not in optional_fields:
|
|
411
|
+
m[k] = val
|
|
412
|
+
|
|
413
|
+
return m
|
|
414
|
+
|
|
303
415
|
|
|
304
416
|
CreateEvalGuardrailConfigEvalsType = Literal["boolean",]
|
|
305
417
|
|
|
@@ -320,6 +432,22 @@ class GuardrailConfigBoolean(BaseModel):
|
|
|
320
432
|
|
|
321
433
|
alert_on_failure: Optional[bool] = False
|
|
322
434
|
|
|
435
|
+
@model_serializer(mode="wrap")
|
|
436
|
+
def serialize_model(self, handler):
|
|
437
|
+
optional_fields = set(["alert_on_failure"])
|
|
438
|
+
serialized = handler(self)
|
|
439
|
+
m = {}
|
|
440
|
+
|
|
441
|
+
for n, f in type(self).model_fields.items():
|
|
442
|
+
k = f.alias or n
|
|
443
|
+
val = serialized.get(k)
|
|
444
|
+
|
|
445
|
+
if val != UNSET_SENTINEL:
|
|
446
|
+
if val is not None or k not in optional_fields:
|
|
447
|
+
m[k] = val
|
|
448
|
+
|
|
449
|
+
return m
|
|
450
|
+
|
|
323
451
|
|
|
324
452
|
RequestBodyGuardrailConfigTypedDict = TypeAliasType(
|
|
325
453
|
"RequestBodyGuardrailConfigTypedDict",
|
|
@@ -379,6 +507,22 @@ class JSON(BaseModel):
|
|
|
379
507
|
|
|
380
508
|
description: Optional[str] = ""
|
|
381
509
|
|
|
510
|
+
@model_serializer(mode="wrap")
|
|
511
|
+
def serialize_model(self, handler):
|
|
512
|
+
optional_fields = set(["guardrail_config", "output_type", "description"])
|
|
513
|
+
serialized = handler(self)
|
|
514
|
+
m = {}
|
|
515
|
+
|
|
516
|
+
for n, f in type(self).model_fields.items():
|
|
517
|
+
k = f.alias or n
|
|
518
|
+
val = serialized.get(k)
|
|
519
|
+
|
|
520
|
+
if val != UNSET_SENTINEL:
|
|
521
|
+
if val is not None or k not in optional_fields:
|
|
522
|
+
m[k] = val
|
|
523
|
+
|
|
524
|
+
return m
|
|
525
|
+
|
|
382
526
|
|
|
383
527
|
GuardrailConfigType = Literal["number",]
|
|
384
528
|
|
|
@@ -412,6 +556,22 @@ class Number(BaseModel):
|
|
|
412
556
|
|
|
413
557
|
alert_on_failure: Optional[bool] = False
|
|
414
558
|
|
|
559
|
+
@model_serializer(mode="wrap")
|
|
560
|
+
def serialize_model(self, handler):
|
|
561
|
+
optional_fields = set(["alert_on_failure"])
|
|
562
|
+
serialized = handler(self)
|
|
563
|
+
m = {}
|
|
564
|
+
|
|
565
|
+
for n, f in type(self).model_fields.items():
|
|
566
|
+
k = f.alias or n
|
|
567
|
+
val = serialized.get(k)
|
|
568
|
+
|
|
569
|
+
if val != UNSET_SENTINEL:
|
|
570
|
+
if val is not None or k not in optional_fields:
|
|
571
|
+
m[k] = val
|
|
572
|
+
|
|
573
|
+
return m
|
|
574
|
+
|
|
415
575
|
|
|
416
576
|
CreateEvalGuardrailConfigType = Literal["boolean",]
|
|
417
577
|
|
|
@@ -432,6 +592,22 @@ class Boolean(BaseModel):
|
|
|
432
592
|
|
|
433
593
|
alert_on_failure: Optional[bool] = False
|
|
434
594
|
|
|
595
|
+
@model_serializer(mode="wrap")
|
|
596
|
+
def serialize_model(self, handler):
|
|
597
|
+
optional_fields = set(["alert_on_failure"])
|
|
598
|
+
serialized = handler(self)
|
|
599
|
+
m = {}
|
|
600
|
+
|
|
601
|
+
for n, f in type(self).model_fields.items():
|
|
602
|
+
k = f.alias or n
|
|
603
|
+
val = serialized.get(k)
|
|
604
|
+
|
|
605
|
+
if val != UNSET_SENTINEL:
|
|
606
|
+
if val is not None or k not in optional_fields:
|
|
607
|
+
m[k] = val
|
|
608
|
+
|
|
609
|
+
return m
|
|
610
|
+
|
|
435
611
|
|
|
436
612
|
GuardrailConfigTypedDict = TypeAliasType(
|
|
437
613
|
"GuardrailConfigTypedDict", Union[BooleanTypedDict, NumberTypedDict]
|
|
@@ -498,6 +674,22 @@ class Llm(BaseModel):
|
|
|
498
674
|
|
|
499
675
|
description: Optional[str] = ""
|
|
500
676
|
|
|
677
|
+
@model_serializer(mode="wrap")
|
|
678
|
+
def serialize_model(self, handler):
|
|
679
|
+
optional_fields = set(["guardrail_config", "output_type", "description"])
|
|
680
|
+
serialized = handler(self)
|
|
681
|
+
m = {}
|
|
682
|
+
|
|
683
|
+
for n, f in type(self).model_fields.items():
|
|
684
|
+
k = f.alias or n
|
|
685
|
+
val = serialized.get(k)
|
|
686
|
+
|
|
687
|
+
if val != UNSET_SENTINEL:
|
|
688
|
+
if val is not None or k not in optional_fields:
|
|
689
|
+
m[k] = val
|
|
690
|
+
|
|
691
|
+
return m
|
|
692
|
+
|
|
501
693
|
|
|
502
694
|
CreateEvalRequestBodyTypedDict = TypeAliasType(
|
|
503
695
|
"CreateEvalRequestBodyTypedDict",
|
|
@@ -582,6 +774,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Numbe
|
|
|
582
774
|
|
|
583
775
|
alert_on_failure: Optional[bool] = False
|
|
584
776
|
|
|
777
|
+
@model_serializer(mode="wrap")
|
|
778
|
+
def serialize_model(self, handler):
|
|
779
|
+
optional_fields = set(["alert_on_failure"])
|
|
780
|
+
serialized = handler(self)
|
|
781
|
+
m = {}
|
|
782
|
+
|
|
783
|
+
for n, f in type(self).model_fields.items():
|
|
784
|
+
k = f.alias or n
|
|
785
|
+
val = serialized.get(k)
|
|
786
|
+
|
|
787
|
+
if val != UNSET_SENTINEL:
|
|
788
|
+
if val is not None or k not in optional_fields:
|
|
789
|
+
m[k] = val
|
|
790
|
+
|
|
791
|
+
return m
|
|
792
|
+
|
|
585
793
|
|
|
586
794
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Type = Literal[
|
|
587
795
|
"boolean",
|
|
@@ -608,6 +816,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boole
|
|
|
608
816
|
|
|
609
817
|
alert_on_failure: Optional[bool] = False
|
|
610
818
|
|
|
819
|
+
@model_serializer(mode="wrap")
|
|
820
|
+
def serialize_model(self, handler):
|
|
821
|
+
optional_fields = set(["alert_on_failure"])
|
|
822
|
+
serialized = handler(self)
|
|
823
|
+
m = {}
|
|
824
|
+
|
|
825
|
+
for n, f in type(self).model_fields.items():
|
|
826
|
+
k = f.alias or n
|
|
827
|
+
val = serialized.get(k)
|
|
828
|
+
|
|
829
|
+
if val != UNSET_SENTINEL:
|
|
830
|
+
if val is not None or k not in optional_fields:
|
|
831
|
+
m[k] = val
|
|
832
|
+
|
|
833
|
+
return m
|
|
834
|
+
|
|
611
835
|
|
|
612
836
|
CreateEvalResponseBodyEvalsResponse200ApplicationJSON7GuardrailConfigTypedDict = TypeAliasType(
|
|
613
837
|
"CreateEvalResponseBodyEvalsResponse200ApplicationJSON7GuardrailConfigTypedDict",
|
|
@@ -660,14 +884,30 @@ class Typescript(BaseModel):
|
|
|
660
884
|
|
|
661
885
|
key: str
|
|
662
886
|
|
|
663
|
-
created: Optional[str] = "2026-01-
|
|
887
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
664
888
|
|
|
665
|
-
updated: Optional[str] = "2026-01-
|
|
889
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
666
890
|
|
|
667
891
|
guardrail_config: Optional[
|
|
668
892
|
CreateEvalResponseBodyEvalsResponse200ApplicationJSON7GuardrailConfig
|
|
669
893
|
] = None
|
|
670
894
|
|
|
895
|
+
@model_serializer(mode="wrap")
|
|
896
|
+
def serialize_model(self, handler):
|
|
897
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
898
|
+
serialized = handler(self)
|
|
899
|
+
m = {}
|
|
900
|
+
|
|
901
|
+
for n, f in type(self).model_fields.items():
|
|
902
|
+
k = f.alias or n
|
|
903
|
+
val = serialized.get(k)
|
|
904
|
+
|
|
905
|
+
if val != UNSET_SENTINEL:
|
|
906
|
+
if val is not None or k not in optional_fields:
|
|
907
|
+
m[k] = val
|
|
908
|
+
|
|
909
|
+
return m
|
|
910
|
+
|
|
671
911
|
|
|
672
912
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody62Type = Literal[
|
|
673
913
|
"number",
|
|
@@ -711,6 +951,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Numbe
|
|
|
711
951
|
|
|
712
952
|
alert_on_failure: Optional[bool] = False
|
|
713
953
|
|
|
954
|
+
@model_serializer(mode="wrap")
|
|
955
|
+
def serialize_model(self, handler):
|
|
956
|
+
optional_fields = set(["alert_on_failure"])
|
|
957
|
+
serialized = handler(self)
|
|
958
|
+
m = {}
|
|
959
|
+
|
|
960
|
+
for n, f in type(self).model_fields.items():
|
|
961
|
+
k = f.alias or n
|
|
962
|
+
val = serialized.get(k)
|
|
963
|
+
|
|
964
|
+
if val != UNSET_SENTINEL:
|
|
965
|
+
if val is not None or k not in optional_fields:
|
|
966
|
+
m[k] = val
|
|
967
|
+
|
|
968
|
+
return m
|
|
969
|
+
|
|
714
970
|
|
|
715
971
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Type = Literal[
|
|
716
972
|
"boolean",
|
|
@@ -737,6 +993,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boole
|
|
|
737
993
|
|
|
738
994
|
alert_on_failure: Optional[bool] = False
|
|
739
995
|
|
|
996
|
+
@model_serializer(mode="wrap")
|
|
997
|
+
def serialize_model(self, handler):
|
|
998
|
+
optional_fields = set(["alert_on_failure"])
|
|
999
|
+
serialized = handler(self)
|
|
1000
|
+
m = {}
|
|
1001
|
+
|
|
1002
|
+
for n, f in type(self).model_fields.items():
|
|
1003
|
+
k = f.alias or n
|
|
1004
|
+
val = serialized.get(k)
|
|
1005
|
+
|
|
1006
|
+
if val != UNSET_SENTINEL:
|
|
1007
|
+
if val is not None or k not in optional_fields:
|
|
1008
|
+
m[k] = val
|
|
1009
|
+
|
|
1010
|
+
return m
|
|
1011
|
+
|
|
740
1012
|
|
|
741
1013
|
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfigTypedDict = TypeAliasType(
|
|
742
1014
|
"CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfigTypedDict",
|
|
@@ -808,14 +1080,30 @@ class Ragas(BaseModel):
|
|
|
808
1080
|
|
|
809
1081
|
model: str
|
|
810
1082
|
|
|
811
|
-
created: Optional[str] = "2026-01-
|
|
1083
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
812
1084
|
|
|
813
|
-
updated: Optional[str] = "2026-01-
|
|
1085
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
814
1086
|
|
|
815
1087
|
guardrail_config: Optional[
|
|
816
1088
|
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig
|
|
817
1089
|
] = None
|
|
818
1090
|
|
|
1091
|
+
@model_serializer(mode="wrap")
|
|
1092
|
+
def serialize_model(self, handler):
|
|
1093
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
1094
|
+
serialized = handler(self)
|
|
1095
|
+
m = {}
|
|
1096
|
+
|
|
1097
|
+
for n, f in type(self).model_fields.items():
|
|
1098
|
+
k = f.alias or n
|
|
1099
|
+
val = serialized.get(k)
|
|
1100
|
+
|
|
1101
|
+
if val != UNSET_SENTINEL:
|
|
1102
|
+
if val is not None or k not in optional_fields:
|
|
1103
|
+
m[k] = val
|
|
1104
|
+
|
|
1105
|
+
return m
|
|
1106
|
+
|
|
819
1107
|
|
|
820
1108
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody52Type = Literal[
|
|
821
1109
|
"number",
|
|
@@ -859,6 +1147,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Numbe
|
|
|
859
1147
|
|
|
860
1148
|
alert_on_failure: Optional[bool] = False
|
|
861
1149
|
|
|
1150
|
+
@model_serializer(mode="wrap")
|
|
1151
|
+
def serialize_model(self, handler):
|
|
1152
|
+
optional_fields = set(["alert_on_failure"])
|
|
1153
|
+
serialized = handler(self)
|
|
1154
|
+
m = {}
|
|
1155
|
+
|
|
1156
|
+
for n, f in type(self).model_fields.items():
|
|
1157
|
+
k = f.alias or n
|
|
1158
|
+
val = serialized.get(k)
|
|
1159
|
+
|
|
1160
|
+
if val != UNSET_SENTINEL:
|
|
1161
|
+
if val is not None or k not in optional_fields:
|
|
1162
|
+
m[k] = val
|
|
1163
|
+
|
|
1164
|
+
return m
|
|
1165
|
+
|
|
862
1166
|
|
|
863
1167
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Type = Literal[
|
|
864
1168
|
"boolean",
|
|
@@ -885,6 +1189,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boole
|
|
|
885
1189
|
|
|
886
1190
|
alert_on_failure: Optional[bool] = False
|
|
887
1191
|
|
|
1192
|
+
@model_serializer(mode="wrap")
|
|
1193
|
+
def serialize_model(self, handler):
|
|
1194
|
+
optional_fields = set(["alert_on_failure"])
|
|
1195
|
+
serialized = handler(self)
|
|
1196
|
+
m = {}
|
|
1197
|
+
|
|
1198
|
+
for n, f in type(self).model_fields.items():
|
|
1199
|
+
k = f.alias or n
|
|
1200
|
+
val = serialized.get(k)
|
|
1201
|
+
|
|
1202
|
+
if val != UNSET_SENTINEL:
|
|
1203
|
+
if val is not None or k not in optional_fields:
|
|
1204
|
+
m[k] = val
|
|
1205
|
+
|
|
1206
|
+
return m
|
|
1207
|
+
|
|
888
1208
|
|
|
889
1209
|
CreateEvalResponseBodyEvalsResponse200GuardrailConfigTypedDict = TypeAliasType(
|
|
890
1210
|
"CreateEvalResponseBodyEvalsResponse200GuardrailConfigTypedDict",
|
|
@@ -1278,22 +1598,22 @@ class Seven(BaseModel):
|
|
|
1278
1598
|
CreateEvalFunctionParamsEvalsResponse200ApplicationJSONType = Literal["contains_url",]
|
|
1279
1599
|
|
|
1280
1600
|
|
|
1281
|
-
class
|
|
1601
|
+
class SixTypedDict(TypedDict):
|
|
1282
1602
|
type: CreateEvalFunctionParamsEvalsResponse200ApplicationJSONType
|
|
1283
1603
|
|
|
1284
1604
|
|
|
1285
|
-
class
|
|
1605
|
+
class Six(BaseModel):
|
|
1286
1606
|
type: CreateEvalFunctionParamsEvalsResponse200ApplicationJSONType
|
|
1287
1607
|
|
|
1288
1608
|
|
|
1289
1609
|
CreateEvalFunctionParamsEvalsResponse200Type = Literal["contains_email",]
|
|
1290
1610
|
|
|
1291
1611
|
|
|
1292
|
-
class
|
|
1612
|
+
class FiveTypedDict(TypedDict):
|
|
1293
1613
|
type: CreateEvalFunctionParamsEvalsResponse200Type
|
|
1294
1614
|
|
|
1295
1615
|
|
|
1296
|
-
class
|
|
1616
|
+
class Five(BaseModel):
|
|
1297
1617
|
type: CreateEvalFunctionParamsEvalsResponse200Type
|
|
1298
1618
|
|
|
1299
1619
|
|
|
@@ -1360,8 +1680,8 @@ FunctionParamsTypedDict = TypeAliasType(
|
|
|
1360
1680
|
TwentySixTypedDict,
|
|
1361
1681
|
ThirtyOneTypedDict,
|
|
1362
1682
|
ThirtyTypedDict,
|
|
1363
|
-
|
|
1364
|
-
|
|
1683
|
+
FiveTypedDict,
|
|
1684
|
+
SixTypedDict,
|
|
1365
1685
|
SevenTypedDict,
|
|
1366
1686
|
TwentyNineTypedDict,
|
|
1367
1687
|
TwentyEightTypedDict,
|
|
@@ -1398,8 +1718,8 @@ FunctionParams = Annotated[
|
|
|
1398
1718
|
Annotated[CreateEvalFunctionParams2, Tag("contains_none")],
|
|
1399
1719
|
Annotated[CreateEvalFunctionParams3, Tag("contains_all")],
|
|
1400
1720
|
Annotated[CreateEvalFunctionParams4, Tag("contains_any")],
|
|
1401
|
-
Annotated[
|
|
1402
|
-
Annotated[
|
|
1721
|
+
Annotated[Five, Tag("contains_email")],
|
|
1722
|
+
Annotated[Six, Tag("contains_url")],
|
|
1403
1723
|
Annotated[Seven, Tag("contains_valid_link")],
|
|
1404
1724
|
Annotated[Eight, Tag("start_with")],
|
|
1405
1725
|
Annotated[Nine, Tag("ends_with")],
|
|
@@ -1455,14 +1775,30 @@ class CreateEvalResponseBodyFunction(BaseModel):
|
|
|
1455
1775
|
|
|
1456
1776
|
key: str
|
|
1457
1777
|
|
|
1458
|
-
created: Optional[str] = "2026-01-
|
|
1778
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1459
1779
|
|
|
1460
|
-
updated: Optional[str] = "2026-01-
|
|
1780
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1461
1781
|
|
|
1462
1782
|
guardrail_config: Optional[
|
|
1463
1783
|
CreateEvalResponseBodyEvalsResponse200GuardrailConfig
|
|
1464
1784
|
] = None
|
|
1465
1785
|
|
|
1786
|
+
@model_serializer(mode="wrap")
|
|
1787
|
+
def serialize_model(self, handler):
|
|
1788
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
1789
|
+
serialized = handler(self)
|
|
1790
|
+
m = {}
|
|
1791
|
+
|
|
1792
|
+
for n, f in type(self).model_fields.items():
|
|
1793
|
+
k = f.alias or n
|
|
1794
|
+
val = serialized.get(k)
|
|
1795
|
+
|
|
1796
|
+
if val != UNSET_SENTINEL:
|
|
1797
|
+
if val is not None or k not in optional_fields:
|
|
1798
|
+
m[k] = val
|
|
1799
|
+
|
|
1800
|
+
return m
|
|
1801
|
+
|
|
1466
1802
|
|
|
1467
1803
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type = Literal[
|
|
1468
1804
|
"number",
|
|
@@ -1506,6 +1842,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber
|
|
|
1506
1842
|
|
|
1507
1843
|
alert_on_failure: Optional[bool] = False
|
|
1508
1844
|
|
|
1845
|
+
@model_serializer(mode="wrap")
|
|
1846
|
+
def serialize_model(self, handler):
|
|
1847
|
+
optional_fields = set(["alert_on_failure"])
|
|
1848
|
+
serialized = handler(self)
|
|
1849
|
+
m = {}
|
|
1850
|
+
|
|
1851
|
+
for n, f in type(self).model_fields.items():
|
|
1852
|
+
k = f.alias or n
|
|
1853
|
+
val = serialized.get(k)
|
|
1854
|
+
|
|
1855
|
+
if val != UNSET_SENTINEL:
|
|
1856
|
+
if val is not None or k not in optional_fields:
|
|
1857
|
+
m[k] = val
|
|
1858
|
+
|
|
1859
|
+
return m
|
|
1860
|
+
|
|
1509
1861
|
|
|
1510
1862
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type = Literal[
|
|
1511
1863
|
"boolean",
|
|
@@ -1532,6 +1884,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolea
|
|
|
1532
1884
|
|
|
1533
1885
|
alert_on_failure: Optional[bool] = False
|
|
1534
1886
|
|
|
1887
|
+
@model_serializer(mode="wrap")
|
|
1888
|
+
def serialize_model(self, handler):
|
|
1889
|
+
optional_fields = set(["alert_on_failure"])
|
|
1890
|
+
serialized = handler(self)
|
|
1891
|
+
m = {}
|
|
1892
|
+
|
|
1893
|
+
for n, f in type(self).model_fields.items():
|
|
1894
|
+
k = f.alias or n
|
|
1895
|
+
val = serialized.get(k)
|
|
1896
|
+
|
|
1897
|
+
if val != UNSET_SENTINEL:
|
|
1898
|
+
if val is not None or k not in optional_fields:
|
|
1899
|
+
m[k] = val
|
|
1900
|
+
|
|
1901
|
+
return m
|
|
1902
|
+
|
|
1535
1903
|
|
|
1536
1904
|
CreateEvalResponseBodyEvalsResponseGuardrailConfigTypedDict = TypeAliasType(
|
|
1537
1905
|
"CreateEvalResponseBodyEvalsResponseGuardrailConfigTypedDict",
|
|
@@ -1584,14 +1952,30 @@ class ResponseBodyPython(BaseModel):
|
|
|
1584
1952
|
|
|
1585
1953
|
key: str
|
|
1586
1954
|
|
|
1587
|
-
created: Optional[str] = "2026-01-
|
|
1955
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1588
1956
|
|
|
1589
|
-
updated: Optional[str] = "2026-01-
|
|
1957
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1590
1958
|
|
|
1591
1959
|
guardrail_config: Optional[CreateEvalResponseBodyEvalsResponseGuardrailConfig] = (
|
|
1592
1960
|
None
|
|
1593
1961
|
)
|
|
1594
1962
|
|
|
1963
|
+
@model_serializer(mode="wrap")
|
|
1964
|
+
def serialize_model(self, handler):
|
|
1965
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
1966
|
+
serialized = handler(self)
|
|
1967
|
+
m = {}
|
|
1968
|
+
|
|
1969
|
+
for n, f in type(self).model_fields.items():
|
|
1970
|
+
k = f.alias or n
|
|
1971
|
+
val = serialized.get(k)
|
|
1972
|
+
|
|
1973
|
+
if val != UNSET_SENTINEL:
|
|
1974
|
+
if val is not None or k not in optional_fields:
|
|
1975
|
+
m[k] = val
|
|
1976
|
+
|
|
1977
|
+
return m
|
|
1978
|
+
|
|
1595
1979
|
|
|
1596
1980
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type = Literal[
|
|
1597
1981
|
"number",
|
|
@@ -1629,6 +2013,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber(BaseModel):
|
|
|
1629
2013
|
|
|
1630
2014
|
alert_on_failure: Optional[bool] = False
|
|
1631
2015
|
|
|
2016
|
+
@model_serializer(mode="wrap")
|
|
2017
|
+
def serialize_model(self, handler):
|
|
2018
|
+
optional_fields = set(["alert_on_failure"])
|
|
2019
|
+
serialized = handler(self)
|
|
2020
|
+
m = {}
|
|
2021
|
+
|
|
2022
|
+
for n, f in type(self).model_fields.items():
|
|
2023
|
+
k = f.alias or n
|
|
2024
|
+
val = serialized.get(k)
|
|
2025
|
+
|
|
2026
|
+
if val != UNSET_SENTINEL:
|
|
2027
|
+
if val is not None or k not in optional_fields:
|
|
2028
|
+
m[k] = val
|
|
2029
|
+
|
|
2030
|
+
return m
|
|
2031
|
+
|
|
1632
2032
|
|
|
1633
2033
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type = Literal[
|
|
1634
2034
|
"boolean",
|
|
@@ -1653,6 +2053,22 @@ class CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean(BaseModel)
|
|
|
1653
2053
|
|
|
1654
2054
|
alert_on_failure: Optional[bool] = False
|
|
1655
2055
|
|
|
2056
|
+
@model_serializer(mode="wrap")
|
|
2057
|
+
def serialize_model(self, handler):
|
|
2058
|
+
optional_fields = set(["alert_on_failure"])
|
|
2059
|
+
serialized = handler(self)
|
|
2060
|
+
m = {}
|
|
2061
|
+
|
|
2062
|
+
for n, f in type(self).model_fields.items():
|
|
2063
|
+
k = f.alias or n
|
|
2064
|
+
val = serialized.get(k)
|
|
2065
|
+
|
|
2066
|
+
if val != UNSET_SENTINEL:
|
|
2067
|
+
if val is not None or k not in optional_fields:
|
|
2068
|
+
m[k] = val
|
|
2069
|
+
|
|
2070
|
+
return m
|
|
2071
|
+
|
|
1656
2072
|
|
|
1657
2073
|
CreateEvalResponseBodyEvalsGuardrailConfigTypedDict = TypeAliasType(
|
|
1658
2074
|
"CreateEvalResponseBodyEvalsGuardrailConfigTypedDict",
|
|
@@ -1718,12 +2134,28 @@ class ResponseBodyHTTP(BaseModel):
|
|
|
1718
2134
|
|
|
1719
2135
|
key: str
|
|
1720
2136
|
|
|
1721
|
-
created: Optional[str] = "2026-01-
|
|
2137
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1722
2138
|
|
|
1723
|
-
updated: Optional[str] = "2026-01-
|
|
2139
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1724
2140
|
|
|
1725
2141
|
guardrail_config: Optional[CreateEvalResponseBodyEvalsGuardrailConfig] = None
|
|
1726
2142
|
|
|
2143
|
+
@model_serializer(mode="wrap")
|
|
2144
|
+
def serialize_model(self, handler):
|
|
2145
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
2146
|
+
serialized = handler(self)
|
|
2147
|
+
m = {}
|
|
2148
|
+
|
|
2149
|
+
for n, f in type(self).model_fields.items():
|
|
2150
|
+
k = f.alias or n
|
|
2151
|
+
val = serialized.get(k)
|
|
2152
|
+
|
|
2153
|
+
if val != UNSET_SENTINEL:
|
|
2154
|
+
if val is not None or k not in optional_fields:
|
|
2155
|
+
m[k] = val
|
|
2156
|
+
|
|
2157
|
+
return m
|
|
2158
|
+
|
|
1727
2159
|
|
|
1728
2160
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType = Literal[
|
|
1729
2161
|
"number",
|
|
@@ -1759,6 +2191,22 @@ class CreateEvalGuardrailConfigEvalsResponse200Number(BaseModel):
|
|
|
1759
2191
|
|
|
1760
2192
|
alert_on_failure: Optional[bool] = False
|
|
1761
2193
|
|
|
2194
|
+
@model_serializer(mode="wrap")
|
|
2195
|
+
def serialize_model(self, handler):
|
|
2196
|
+
optional_fields = set(["alert_on_failure"])
|
|
2197
|
+
serialized = handler(self)
|
|
2198
|
+
m = {}
|
|
2199
|
+
|
|
2200
|
+
for n, f in type(self).model_fields.items():
|
|
2201
|
+
k = f.alias or n
|
|
2202
|
+
val = serialized.get(k)
|
|
2203
|
+
|
|
2204
|
+
if val != UNSET_SENTINEL:
|
|
2205
|
+
if val is not None or k not in optional_fields:
|
|
2206
|
+
m[k] = val
|
|
2207
|
+
|
|
2208
|
+
return m
|
|
2209
|
+
|
|
1762
2210
|
|
|
1763
2211
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType = Literal["boolean",]
|
|
1764
2212
|
|
|
@@ -1779,6 +2227,22 @@ class CreateEvalGuardrailConfigEvalsResponse200Boolean(BaseModel):
|
|
|
1779
2227
|
|
|
1780
2228
|
alert_on_failure: Optional[bool] = False
|
|
1781
2229
|
|
|
2230
|
+
@model_serializer(mode="wrap")
|
|
2231
|
+
def serialize_model(self, handler):
|
|
2232
|
+
optional_fields = set(["alert_on_failure"])
|
|
2233
|
+
serialized = handler(self)
|
|
2234
|
+
m = {}
|
|
2235
|
+
|
|
2236
|
+
for n, f in type(self).model_fields.items():
|
|
2237
|
+
k = f.alias or n
|
|
2238
|
+
val = serialized.get(k)
|
|
2239
|
+
|
|
2240
|
+
if val != UNSET_SENTINEL:
|
|
2241
|
+
if val is not None or k not in optional_fields:
|
|
2242
|
+
m[k] = val
|
|
2243
|
+
|
|
2244
|
+
return m
|
|
2245
|
+
|
|
1782
2246
|
|
|
1783
2247
|
CreateEvalResponseBodyGuardrailConfigTypedDict = TypeAliasType(
|
|
1784
2248
|
"CreateEvalResponseBodyGuardrailConfigTypedDict",
|
|
@@ -1823,12 +2287,28 @@ class ResponseBodyJSON(BaseModel):
|
|
|
1823
2287
|
|
|
1824
2288
|
key: str
|
|
1825
2289
|
|
|
1826
|
-
created: Optional[str] = "2026-01-
|
|
2290
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1827
2291
|
|
|
1828
|
-
updated: Optional[str] = "2026-01-
|
|
2292
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1829
2293
|
|
|
1830
2294
|
guardrail_config: Optional[CreateEvalResponseBodyGuardrailConfig] = None
|
|
1831
2295
|
|
|
2296
|
+
@model_serializer(mode="wrap")
|
|
2297
|
+
def serialize_model(self, handler):
|
|
2298
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
2299
|
+
serialized = handler(self)
|
|
2300
|
+
m = {}
|
|
2301
|
+
|
|
2302
|
+
for n, f in type(self).model_fields.items():
|
|
2303
|
+
k = f.alias or n
|
|
2304
|
+
val = serialized.get(k)
|
|
2305
|
+
|
|
2306
|
+
if val != UNSET_SENTINEL:
|
|
2307
|
+
if val is not None or k not in optional_fields:
|
|
2308
|
+
m[k] = val
|
|
2309
|
+
|
|
2310
|
+
return m
|
|
2311
|
+
|
|
1832
2312
|
|
|
1833
2313
|
CreateEvalGuardrailConfigEvalsResponse200Type = Literal["number",]
|
|
1834
2314
|
|
|
@@ -1862,6 +2342,22 @@ class CreateEvalGuardrailConfigEvalsResponseNumber(BaseModel):
|
|
|
1862
2342
|
|
|
1863
2343
|
alert_on_failure: Optional[bool] = False
|
|
1864
2344
|
|
|
2345
|
+
@model_serializer(mode="wrap")
|
|
2346
|
+
def serialize_model(self, handler):
|
|
2347
|
+
optional_fields = set(["alert_on_failure"])
|
|
2348
|
+
serialized = handler(self)
|
|
2349
|
+
m = {}
|
|
2350
|
+
|
|
2351
|
+
for n, f in type(self).model_fields.items():
|
|
2352
|
+
k = f.alias or n
|
|
2353
|
+
val = serialized.get(k)
|
|
2354
|
+
|
|
2355
|
+
if val != UNSET_SENTINEL:
|
|
2356
|
+
if val is not None or k not in optional_fields:
|
|
2357
|
+
m[k] = val
|
|
2358
|
+
|
|
2359
|
+
return m
|
|
2360
|
+
|
|
1865
2361
|
|
|
1866
2362
|
CreateEvalGuardrailConfigEvalsResponseType = Literal["boolean",]
|
|
1867
2363
|
|
|
@@ -1882,6 +2378,22 @@ class CreateEvalGuardrailConfigEvalsResponseBoolean(BaseModel):
|
|
|
1882
2378
|
|
|
1883
2379
|
alert_on_failure: Optional[bool] = False
|
|
1884
2380
|
|
|
2381
|
+
@model_serializer(mode="wrap")
|
|
2382
|
+
def serialize_model(self, handler):
|
|
2383
|
+
optional_fields = set(["alert_on_failure"])
|
|
2384
|
+
serialized = handler(self)
|
|
2385
|
+
m = {}
|
|
2386
|
+
|
|
2387
|
+
for n, f in type(self).model_fields.items():
|
|
2388
|
+
k = f.alias or n
|
|
2389
|
+
val = serialized.get(k)
|
|
2390
|
+
|
|
2391
|
+
if val != UNSET_SENTINEL:
|
|
2392
|
+
if val is not None or k not in optional_fields:
|
|
2393
|
+
m[k] = val
|
|
2394
|
+
|
|
2395
|
+
return m
|
|
2396
|
+
|
|
1885
2397
|
|
|
1886
2398
|
ResponseBodyGuardrailConfigTypedDict = TypeAliasType(
|
|
1887
2399
|
"ResponseBodyGuardrailConfigTypedDict",
|
|
@@ -1929,12 +2441,28 @@ class ResponseBodyLLM(BaseModel):
|
|
|
1929
2441
|
|
|
1930
2442
|
model: str
|
|
1931
2443
|
|
|
1932
|
-
created: Optional[str] = "2026-01-
|
|
2444
|
+
created: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1933
2445
|
|
|
1934
|
-
updated: Optional[str] = "2026-01-
|
|
2446
|
+
updated: Optional[str] = "2026-01-25T15:02:08.775Z"
|
|
1935
2447
|
|
|
1936
2448
|
guardrail_config: Optional[ResponseBodyGuardrailConfig] = None
|
|
1937
2449
|
|
|
2450
|
+
@model_serializer(mode="wrap")
|
|
2451
|
+
def serialize_model(self, handler):
|
|
2452
|
+
optional_fields = set(["created", "updated", "guardrail_config"])
|
|
2453
|
+
serialized = handler(self)
|
|
2454
|
+
m = {}
|
|
2455
|
+
|
|
2456
|
+
for n, f in type(self).model_fields.items():
|
|
2457
|
+
k = f.alias or n
|
|
2458
|
+
val = serialized.get(k)
|
|
2459
|
+
|
|
2460
|
+
if val != UNSET_SENTINEL:
|
|
2461
|
+
if val is not None or k not in optional_fields:
|
|
2462
|
+
m[k] = val
|
|
2463
|
+
|
|
2464
|
+
return m
|
|
2465
|
+
|
|
1938
2466
|
|
|
1939
2467
|
CreateEvalResponseBodyTypedDict = TypeAliasType(
|
|
1940
2468
|
"CreateEvalResponseBodyTypedDict",
|