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
|
@@ -125,6 +125,22 @@ class RetrieveDatapointMessagesCacheControl(BaseModel):
|
|
|
125
125
|
Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
126
126
|
"""
|
|
127
127
|
|
|
128
|
+
@model_serializer(mode="wrap")
|
|
129
|
+
def serialize_model(self, handler):
|
|
130
|
+
optional_fields = set(["ttl"])
|
|
131
|
+
serialized = handler(self)
|
|
132
|
+
m = {}
|
|
133
|
+
|
|
134
|
+
for n, f in type(self).model_fields.items():
|
|
135
|
+
k = f.alias or n
|
|
136
|
+
val = serialized.get(k)
|
|
137
|
+
|
|
138
|
+
if val != UNSET_SENTINEL:
|
|
139
|
+
if val is not None or k not in optional_fields:
|
|
140
|
+
m[k] = val
|
|
141
|
+
|
|
142
|
+
return m
|
|
143
|
+
|
|
128
144
|
|
|
129
145
|
class RetrieveDatapointMessagesToolMessageTypedDict(TypedDict):
|
|
130
146
|
role: RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole
|
|
@@ -150,31 +166,26 @@ class RetrieveDatapointMessagesToolMessage(BaseModel):
|
|
|
150
166
|
|
|
151
167
|
@model_serializer(mode="wrap")
|
|
152
168
|
def serialize_model(self, handler):
|
|
153
|
-
optional_fields = ["cache_control"]
|
|
154
|
-
nullable_fields = ["tool_call_id"]
|
|
155
|
-
null_default_fields = []
|
|
156
|
-
|
|
169
|
+
optional_fields = set(["cache_control"])
|
|
170
|
+
nullable_fields = set(["tool_call_id"])
|
|
157
171
|
serialized = handler(self)
|
|
158
|
-
|
|
159
172
|
m = {}
|
|
160
173
|
|
|
161
174
|
for n, f in type(self).model_fields.items():
|
|
162
175
|
k = f.alias or n
|
|
163
176
|
val = serialized.get(k)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
):
|
|
177
|
-
m[k] = val
|
|
177
|
+
is_nullable_and_explicitly_set = (
|
|
178
|
+
k in nullable_fields
|
|
179
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
if val != UNSET_SENTINEL:
|
|
183
|
+
if (
|
|
184
|
+
val is not None
|
|
185
|
+
or k not in optional_fields
|
|
186
|
+
or is_nullable_and_explicitly_set
|
|
187
|
+
):
|
|
188
|
+
m[k] = val
|
|
178
189
|
|
|
179
190
|
return m
|
|
180
191
|
|
|
@@ -251,6 +262,22 @@ class RetrieveDatapointMessagesFunction(BaseModel):
|
|
|
251
262
|
arguments: Optional[str] = None
|
|
252
263
|
r"""The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."""
|
|
253
264
|
|
|
265
|
+
@model_serializer(mode="wrap")
|
|
266
|
+
def serialize_model(self, handler):
|
|
267
|
+
optional_fields = set(["name", "arguments"])
|
|
268
|
+
serialized = handler(self)
|
|
269
|
+
m = {}
|
|
270
|
+
|
|
271
|
+
for n, f in type(self).model_fields.items():
|
|
272
|
+
k = f.alias or n
|
|
273
|
+
val = serialized.get(k)
|
|
274
|
+
|
|
275
|
+
if val != UNSET_SENTINEL:
|
|
276
|
+
if val is not None or k not in optional_fields:
|
|
277
|
+
m[k] = val
|
|
278
|
+
|
|
279
|
+
return m
|
|
280
|
+
|
|
254
281
|
|
|
255
282
|
class RetrieveDatapointMessagesToolCallsTypedDict(TypedDict):
|
|
256
283
|
id: str
|
|
@@ -274,6 +301,22 @@ class RetrieveDatapointMessagesToolCalls(BaseModel):
|
|
|
274
301
|
thought_signature: Optional[str] = None
|
|
275
302
|
r"""Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call."""
|
|
276
303
|
|
|
304
|
+
@model_serializer(mode="wrap")
|
|
305
|
+
def serialize_model(self, handler):
|
|
306
|
+
optional_fields = set(["thought_signature"])
|
|
307
|
+
serialized = handler(self)
|
|
308
|
+
m = {}
|
|
309
|
+
|
|
310
|
+
for n, f in type(self).model_fields.items():
|
|
311
|
+
k = f.alias or n
|
|
312
|
+
val = serialized.get(k)
|
|
313
|
+
|
|
314
|
+
if val != UNSET_SENTINEL:
|
|
315
|
+
if val is not None or k not in optional_fields:
|
|
316
|
+
m[k] = val
|
|
317
|
+
|
|
318
|
+
return m
|
|
319
|
+
|
|
277
320
|
|
|
278
321
|
class RetrieveDatapointMessagesAssistantMessageTypedDict(TypedDict):
|
|
279
322
|
role: RetrieveDatapointMessagesDatasetsResponse200Role
|
|
@@ -315,31 +358,26 @@ class RetrieveDatapointMessagesAssistantMessage(BaseModel):
|
|
|
315
358
|
|
|
316
359
|
@model_serializer(mode="wrap")
|
|
317
360
|
def serialize_model(self, handler):
|
|
318
|
-
optional_fields = ["content", "refusal", "name", "audio", "tool_calls"]
|
|
319
|
-
nullable_fields = ["content", "refusal", "audio"]
|
|
320
|
-
null_default_fields = []
|
|
321
|
-
|
|
361
|
+
optional_fields = set(["content", "refusal", "name", "audio", "tool_calls"])
|
|
362
|
+
nullable_fields = set(["content", "refusal", "audio"])
|
|
322
363
|
serialized = handler(self)
|
|
323
|
-
|
|
324
364
|
m = {}
|
|
325
365
|
|
|
326
366
|
for n, f in type(self).model_fields.items():
|
|
327
367
|
k = f.alias or n
|
|
328
368
|
val = serialized.get(k)
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
):
|
|
342
|
-
m[k] = val
|
|
369
|
+
is_nullable_and_explicitly_set = (
|
|
370
|
+
k in nullable_fields
|
|
371
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
if val != UNSET_SENTINEL:
|
|
375
|
+
if (
|
|
376
|
+
val is not None
|
|
377
|
+
or k not in optional_fields
|
|
378
|
+
or is_nullable_and_explicitly_set
|
|
379
|
+
):
|
|
380
|
+
m[k] = val
|
|
343
381
|
|
|
344
382
|
return m
|
|
345
383
|
|
|
@@ -395,6 +433,22 @@ class RetrieveDatapoint2CacheControl(BaseModel):
|
|
|
395
433
|
Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
396
434
|
"""
|
|
397
435
|
|
|
436
|
+
@model_serializer(mode="wrap")
|
|
437
|
+
def serialize_model(self, handler):
|
|
438
|
+
optional_fields = set(["ttl"])
|
|
439
|
+
serialized = handler(self)
|
|
440
|
+
m = {}
|
|
441
|
+
|
|
442
|
+
for n, f in type(self).model_fields.items():
|
|
443
|
+
k = f.alias or n
|
|
444
|
+
val = serialized.get(k)
|
|
445
|
+
|
|
446
|
+
if val != UNSET_SENTINEL:
|
|
447
|
+
if val is not None or k not in optional_fields:
|
|
448
|
+
m[k] = val
|
|
449
|
+
|
|
450
|
+
return m
|
|
451
|
+
|
|
398
452
|
|
|
399
453
|
class RetrieveDatapoint24TypedDict(TypedDict):
|
|
400
454
|
type: RetrieveDatapoint2Type
|
|
@@ -413,6 +467,22 @@ class RetrieveDatapoint24(BaseModel):
|
|
|
413
467
|
|
|
414
468
|
cache_control: Optional[RetrieveDatapoint2CacheControl] = None
|
|
415
469
|
|
|
470
|
+
@model_serializer(mode="wrap")
|
|
471
|
+
def serialize_model(self, handler):
|
|
472
|
+
optional_fields = set(["cache_control"])
|
|
473
|
+
serialized = handler(self)
|
|
474
|
+
m = {}
|
|
475
|
+
|
|
476
|
+
for n, f in type(self).model_fields.items():
|
|
477
|
+
k = f.alias or n
|
|
478
|
+
val = serialized.get(k)
|
|
479
|
+
|
|
480
|
+
if val != UNSET_SENTINEL:
|
|
481
|
+
if val is not None or k not in optional_fields:
|
|
482
|
+
m[k] = val
|
|
483
|
+
|
|
484
|
+
return m
|
|
485
|
+
|
|
416
486
|
|
|
417
487
|
RetrieveDatapointContent2TypedDict = TypeAliasType(
|
|
418
488
|
"RetrieveDatapointContent2TypedDict",
|
|
@@ -469,6 +539,22 @@ class RetrieveDatapointMessagesUserMessage(BaseModel):
|
|
|
469
539
|
name: Optional[str] = None
|
|
470
540
|
r"""An optional name for the participant. Provides the model information to differentiate between participants of the same role."""
|
|
471
541
|
|
|
542
|
+
@model_serializer(mode="wrap")
|
|
543
|
+
def serialize_model(self, handler):
|
|
544
|
+
optional_fields = set(["name"])
|
|
545
|
+
serialized = handler(self)
|
|
546
|
+
m = {}
|
|
547
|
+
|
|
548
|
+
for n, f in type(self).model_fields.items():
|
|
549
|
+
k = f.alias or n
|
|
550
|
+
val = serialized.get(k)
|
|
551
|
+
|
|
552
|
+
if val != UNSET_SENTINEL:
|
|
553
|
+
if val is not None or k not in optional_fields:
|
|
554
|
+
m[k] = val
|
|
555
|
+
|
|
556
|
+
return m
|
|
557
|
+
|
|
472
558
|
|
|
473
559
|
RetrieveDatapointMessagesDatasetsRole = Literal["developer",]
|
|
474
560
|
r"""The role of the messages author, in this case `developer`."""
|
|
@@ -506,6 +592,22 @@ class RetrieveDatapointMessagesDeveloperMessage(BaseModel):
|
|
|
506
592
|
name: Optional[str] = None
|
|
507
593
|
r"""An optional name for the participant. Provides the model information to differentiate between participants of the same role."""
|
|
508
594
|
|
|
595
|
+
@model_serializer(mode="wrap")
|
|
596
|
+
def serialize_model(self, handler):
|
|
597
|
+
optional_fields = set(["name"])
|
|
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
|
+
|
|
509
611
|
|
|
510
612
|
RetrieveDatapointMessagesRole = Literal["system",]
|
|
511
613
|
r"""The role of the messages author, in this case `system`."""
|
|
@@ -547,6 +649,22 @@ class RetrieveDatapointMessagesSystemMessage(BaseModel):
|
|
|
547
649
|
name: Optional[str] = None
|
|
548
650
|
r"""An optional name for the participant. Provides the model information to differentiate between participants of the same role."""
|
|
549
651
|
|
|
652
|
+
@model_serializer(mode="wrap")
|
|
653
|
+
def serialize_model(self, handler):
|
|
654
|
+
optional_fields = set(["name"])
|
|
655
|
+
serialized = handler(self)
|
|
656
|
+
m = {}
|
|
657
|
+
|
|
658
|
+
for n, f in type(self).model_fields.items():
|
|
659
|
+
k = f.alias or n
|
|
660
|
+
val = serialized.get(k)
|
|
661
|
+
|
|
662
|
+
if val != UNSET_SENTINEL:
|
|
663
|
+
if val is not None or k not in optional_fields:
|
|
664
|
+
m[k] = val
|
|
665
|
+
|
|
666
|
+
return m
|
|
667
|
+
|
|
550
668
|
|
|
551
669
|
RetrieveDatapointMessagesTypedDict = TypeAliasType(
|
|
552
670
|
"RetrieveDatapointMessagesTypedDict",
|
|
@@ -620,9 +738,25 @@ class RetrieveDatapointEvaluations3(BaseModel):
|
|
|
620
738
|
|
|
621
739
|
source: Optional[RetrieveDatapointEvaluationsDatasetsResponseSource] = "orq"
|
|
622
740
|
|
|
623
|
-
reviewed_at: Optional[datetime] = parse_datetime("2026-01-
|
|
741
|
+
reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T15:02:19.541Z")
|
|
624
742
|
r"""The date and time the item was reviewed"""
|
|
625
743
|
|
|
744
|
+
@model_serializer(mode="wrap")
|
|
745
|
+
def serialize_model(self, handler):
|
|
746
|
+
optional_fields = set(["source", "reviewed_at"])
|
|
747
|
+
serialized = handler(self)
|
|
748
|
+
m = {}
|
|
749
|
+
|
|
750
|
+
for n, f in type(self).model_fields.items():
|
|
751
|
+
k = f.alias or n
|
|
752
|
+
val = serialized.get(k)
|
|
753
|
+
|
|
754
|
+
if val != UNSET_SENTINEL:
|
|
755
|
+
if val is not None or k not in optional_fields:
|
|
756
|
+
m[k] = val
|
|
757
|
+
|
|
758
|
+
return m
|
|
759
|
+
|
|
626
760
|
|
|
627
761
|
RetrieveDatapointEvaluationsDatasetsEvaluationType = Literal["human_review",]
|
|
628
762
|
r"""The type of evaluation"""
|
|
@@ -672,9 +806,25 @@ class RetrieveDatapointEvaluations2(BaseModel):
|
|
|
672
806
|
|
|
673
807
|
source: Optional[RetrieveDatapointEvaluationsDatasetsSource] = "orq"
|
|
674
808
|
|
|
675
|
-
reviewed_at: Optional[datetime] = parse_datetime("2026-01-
|
|
809
|
+
reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T15:02:19.540Z")
|
|
676
810
|
r"""The date and time the item was reviewed"""
|
|
677
811
|
|
|
812
|
+
@model_serializer(mode="wrap")
|
|
813
|
+
def serialize_model(self, handler):
|
|
814
|
+
optional_fields = set(["source", "reviewed_at"])
|
|
815
|
+
serialized = handler(self)
|
|
816
|
+
m = {}
|
|
817
|
+
|
|
818
|
+
for n, f in type(self).model_fields.items():
|
|
819
|
+
k = f.alias or n
|
|
820
|
+
val = serialized.get(k)
|
|
821
|
+
|
|
822
|
+
if val != UNSET_SENTINEL:
|
|
823
|
+
if val is not None or k not in optional_fields:
|
|
824
|
+
m[k] = val
|
|
825
|
+
|
|
826
|
+
return m
|
|
827
|
+
|
|
678
828
|
|
|
679
829
|
RetrieveDatapointEvaluationsEvaluationType = Literal["human_review",]
|
|
680
830
|
r"""The type of evaluation"""
|
|
@@ -724,9 +874,25 @@ class RetrieveDatapointEvaluations1(BaseModel):
|
|
|
724
874
|
|
|
725
875
|
source: Optional[RetrieveDatapointEvaluationsSource] = "orq"
|
|
726
876
|
|
|
727
|
-
reviewed_at: Optional[datetime] = parse_datetime("2026-01-
|
|
877
|
+
reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T15:02:19.540Z")
|
|
728
878
|
r"""The date and time the item was reviewed"""
|
|
729
879
|
|
|
880
|
+
@model_serializer(mode="wrap")
|
|
881
|
+
def serialize_model(self, handler):
|
|
882
|
+
optional_fields = set(["source", "reviewed_at"])
|
|
883
|
+
serialized = handler(self)
|
|
884
|
+
m = {}
|
|
885
|
+
|
|
886
|
+
for n, f in type(self).model_fields.items():
|
|
887
|
+
k = f.alias or n
|
|
888
|
+
val = serialized.get(k)
|
|
889
|
+
|
|
890
|
+
if val != UNSET_SENTINEL:
|
|
891
|
+
if val is not None or k not in optional_fields:
|
|
892
|
+
m[k] = val
|
|
893
|
+
|
|
894
|
+
return m
|
|
895
|
+
|
|
730
896
|
|
|
731
897
|
RetrieveDatapointEvaluationsTypedDict = TypeAliasType(
|
|
732
898
|
"RetrieveDatapointEvaluationsTypedDict",
|
|
@@ -811,5 +977,33 @@ class RetrieveDatapointResponseBody(BaseModel):
|
|
|
811
977
|
created: Optional[datetime] = None
|
|
812
978
|
r"""The date and time the resource was created"""
|
|
813
979
|
|
|
814
|
-
updated: Optional[datetime] = parse_datetime("2026-01-
|
|
980
|
+
updated: Optional[datetime] = parse_datetime("2026-01-25T15:02:07.185Z")
|
|
815
981
|
r"""The date and time the resource was last updated"""
|
|
982
|
+
|
|
983
|
+
@model_serializer(mode="wrap")
|
|
984
|
+
def serialize_model(self, handler):
|
|
985
|
+
optional_fields = set(
|
|
986
|
+
[
|
|
987
|
+
"inputs",
|
|
988
|
+
"messages",
|
|
989
|
+
"expected_output",
|
|
990
|
+
"evaluations",
|
|
991
|
+
"snapshot_version",
|
|
992
|
+
"created_by_id",
|
|
993
|
+
"updated_by_id",
|
|
994
|
+
"created",
|
|
995
|
+
"updated",
|
|
996
|
+
]
|
|
997
|
+
)
|
|
998
|
+
serialized = handler(self)
|
|
999
|
+
m = {}
|
|
1000
|
+
|
|
1001
|
+
for n, f in type(self).model_fields.items():
|
|
1002
|
+
k = f.alias or n
|
|
1003
|
+
val = serialized.get(k)
|
|
1004
|
+
|
|
1005
|
+
if val != UNSET_SENTINEL:
|
|
1006
|
+
if val is not None or k not in optional_fields:
|
|
1007
|
+
m[k] = val
|
|
1008
|
+
|
|
1009
|
+
return m
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from datetime import datetime
|
|
5
|
-
from orq_ai_sdk.types import BaseModel
|
|
5
|
+
from orq_ai_sdk.types import BaseModel, UNSET_SENTINEL
|
|
6
6
|
from orq_ai_sdk.utils import FieldMetadata, PathParamMetadata, parse_datetime
|
|
7
7
|
import pydantic
|
|
8
|
+
from pydantic import model_serializer
|
|
8
9
|
from typing import Optional
|
|
9
10
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
11
|
|
|
@@ -80,5 +81,21 @@ class RetrieveDatasetResponseBody(BaseModel):
|
|
|
80
81
|
created: Optional[datetime] = None
|
|
81
82
|
r"""The date and time the resource was created"""
|
|
82
83
|
|
|
83
|
-
updated: Optional[datetime] = parse_datetime("2026-01-
|
|
84
|
+
updated: Optional[datetime] = parse_datetime("2026-01-25T15:02:07.185Z")
|
|
84
85
|
r"""The date and time the resource was last updated"""
|
|
86
|
+
|
|
87
|
+
@model_serializer(mode="wrap")
|
|
88
|
+
def serialize_model(self, handler):
|
|
89
|
+
optional_fields = set(["created_by_id", "updated_by_id", "created", "updated"])
|
|
90
|
+
serialized = handler(self)
|
|
91
|
+
m = {}
|
|
92
|
+
|
|
93
|
+
for n, f in type(self).model_fields.items():
|
|
94
|
+
k = f.alias or n
|
|
95
|
+
val = serialized.get(k)
|
|
96
|
+
|
|
97
|
+
if val != UNSET_SENTINEL:
|
|
98
|
+
if val is not None or k not in optional_fields:
|
|
99
|
+
m[k] = val
|
|
100
|
+
|
|
101
|
+
return m
|
|
@@ -90,7 +90,7 @@ class RetrieveDatasourceResponseBody(BaseModel):
|
|
|
90
90
|
r"""The number of chunks in the datasource"""
|
|
91
91
|
|
|
92
92
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
93
|
-
"
|
|
93
|
+
"01KFTTTRHX72MZXWE8CHEWJ48Q"
|
|
94
94
|
)
|
|
95
95
|
r"""The unique identifier of the data source"""
|
|
96
96
|
|
|
@@ -108,36 +108,27 @@ class RetrieveDatasourceResponseBody(BaseModel):
|
|
|
108
108
|
|
|
109
109
|
@model_serializer(mode="wrap")
|
|
110
110
|
def serialize_model(self, handler):
|
|
111
|
-
optional_fields =
|
|
112
|
-
"_id",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"created_by_id",
|
|
116
|
-
"update_by_id",
|
|
117
|
-
]
|
|
118
|
-
nullable_fields = ["file_id", "created_by_id", "update_by_id"]
|
|
119
|
-
null_default_fields = []
|
|
120
|
-
|
|
111
|
+
optional_fields = set(
|
|
112
|
+
["_id", "description", "file_id", "created_by_id", "update_by_id"]
|
|
113
|
+
)
|
|
114
|
+
nullable_fields = set(["file_id", "created_by_id", "update_by_id"])
|
|
121
115
|
serialized = handler(self)
|
|
122
|
-
|
|
123
116
|
m = {}
|
|
124
117
|
|
|
125
118
|
for n, f in type(self).model_fields.items():
|
|
126
119
|
k = f.alias or n
|
|
127
120
|
val = serialized.get(k)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
):
|
|
141
|
-
m[k] = val
|
|
121
|
+
is_nullable_and_explicitly_set = (
|
|
122
|
+
k in nullable_fields
|
|
123
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
if val != UNSET_SENTINEL:
|
|
127
|
+
if (
|
|
128
|
+
val is not None
|
|
129
|
+
or k not in optional_fields
|
|
130
|
+
or is_nullable_and_explicitly_set
|
|
131
|
+
):
|
|
132
|
+
m[k] = val
|
|
142
133
|
|
|
143
134
|
return m
|
|
@@ -19,32 +19,32 @@ from typing import Any, Dict, List, Optional
|
|
|
19
19
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class
|
|
22
|
+
class RetrieveIdentityRequestTypedDict(TypedDict):
|
|
23
23
|
id: str
|
|
24
|
-
r"""Unique
|
|
24
|
+
r"""Unique identity id or external id"""
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class RetrieveIdentityRequest(BaseModel):
|
|
28
28
|
id: Annotated[
|
|
29
29
|
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
30
30
|
]
|
|
31
|
-
r"""Unique
|
|
31
|
+
r"""Unique identity id or external id"""
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class
|
|
34
|
+
class RetrieveIdentityIdentitiesResponseBodyData(BaseModel):
|
|
35
35
|
error: str
|
|
36
36
|
r"""Error message"""
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
@dataclass(unsafe_hash=True)
|
|
40
|
-
class
|
|
41
|
-
r"""
|
|
40
|
+
class RetrieveIdentityIdentitiesResponseBody(OrqError):
|
|
41
|
+
r"""Identity not found"""
|
|
42
42
|
|
|
43
|
-
data:
|
|
43
|
+
data: RetrieveIdentityIdentitiesResponseBodyData = field(hash=False)
|
|
44
44
|
|
|
45
45
|
def __init__(
|
|
46
46
|
self,
|
|
47
|
-
data:
|
|
47
|
+
data: RetrieveIdentityIdentitiesResponseBodyData,
|
|
48
48
|
raw_response: httpx.Response,
|
|
49
49
|
body: Optional[str] = None,
|
|
50
50
|
):
|
|
@@ -53,8 +53,8 @@ class RetrieveContactContactsResponseBody(OrqError):
|
|
|
53
53
|
object.__setattr__(self, "data", data)
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class
|
|
57
|
-
r"""
|
|
56
|
+
class RetrieveIdentityResponseBodyTypedDict(TypedDict):
|
|
57
|
+
r"""Identity details"""
|
|
58
58
|
|
|
59
59
|
id: str
|
|
60
60
|
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
@@ -76,8 +76,8 @@ class RetrieveContactResponseBodyTypedDict(TypedDict):
|
|
|
76
76
|
r"""The date and time the resource was last updated"""
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
class
|
|
80
|
-
r"""
|
|
79
|
+
class RetrieveIdentityResponseBody(BaseModel):
|
|
80
|
+
r"""Identity details"""
|
|
81
81
|
|
|
82
82
|
id: Annotated[str, pydantic.Field(alias="_id")]
|
|
83
83
|
r"""Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact"""
|
|
@@ -103,43 +103,40 @@ class RetrieveContactResponseBody(BaseModel):
|
|
|
103
103
|
created: Optional[datetime] = None
|
|
104
104
|
r"""The date and time the resource was created"""
|
|
105
105
|
|
|
106
|
-
updated: Optional[datetime] = parse_datetime("2026-01-
|
|
106
|
+
updated: Optional[datetime] = parse_datetime("2026-01-25T15:02:07.185Z")
|
|
107
107
|
r"""The date and time the resource was last updated"""
|
|
108
108
|
|
|
109
109
|
@model_serializer(mode="wrap")
|
|
110
110
|
def serialize_model(self, handler):
|
|
111
|
-
optional_fields =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
optional_fields = set(
|
|
112
|
+
[
|
|
113
|
+
"display_name",
|
|
114
|
+
"email",
|
|
115
|
+
"avatar_url",
|
|
116
|
+
"tags",
|
|
117
|
+
"metadata",
|
|
118
|
+
"created",
|
|
119
|
+
"updated",
|
|
120
|
+
]
|
|
121
|
+
)
|
|
122
|
+
nullable_fields = set(["display_name", "email", "avatar_url"])
|
|
123
123
|
serialized = handler(self)
|
|
124
|
-
|
|
125
124
|
m = {}
|
|
126
125
|
|
|
127
126
|
for n, f in type(self).model_fields.items():
|
|
128
127
|
k = f.alias or n
|
|
129
128
|
val = serialized.get(k)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
):
|
|
143
|
-
m[k] = val
|
|
129
|
+
is_nullable_and_explicitly_set = (
|
|
130
|
+
k in nullable_fields
|
|
131
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
if val != UNSET_SENTINEL:
|
|
135
|
+
if (
|
|
136
|
+
val is not None
|
|
137
|
+
or k not in optional_fields
|
|
138
|
+
or is_nullable_and_explicitly_set
|
|
139
|
+
):
|
|
140
|
+
m[k] = val
|
|
144
141
|
|
|
145
142
|
return m
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from orq_ai_sdk.types import BaseModel
|
|
4
|
+
from orq_ai_sdk.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
from orq_ai_sdk.utils import FieldMetadata, PathParamMetadata
|
|
6
6
|
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
7
8
|
from typing import Dict, Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
@@ -75,3 +76,19 @@ class RetrieveMemoryDocumentResponseBody(BaseModel):
|
|
|
75
76
|
|
|
76
77
|
metadata: Optional[Dict[str, str]] = None
|
|
77
78
|
r"""Flexible key-value pairs for custom filtering and categorization. Clients can add arbitrary string metadata to enable future filtering of memory documents based on their specific needs (e.g., document type, source, topic, relevance score, or any custom taxonomy)."""
|
|
79
|
+
|
|
80
|
+
@model_serializer(mode="wrap")
|
|
81
|
+
def serialize_model(self, handler):
|
|
82
|
+
optional_fields = set(["created_by_id", "updated_by_id", "metadata"])
|
|
83
|
+
serialized = handler(self)
|
|
84
|
+
m = {}
|
|
85
|
+
|
|
86
|
+
for n, f in type(self).model_fields.items():
|
|
87
|
+
k = f.alias or n
|
|
88
|
+
val = serialized.get(k)
|
|
89
|
+
|
|
90
|
+
if val != UNSET_SENTINEL:
|
|
91
|
+
if val is not None or k not in optional_fields:
|
|
92
|
+
m[k] = val
|
|
93
|
+
|
|
94
|
+
return m
|