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,7 +4,7 @@ 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 (
|
|
9
9
|
FieldMetadata,
|
|
10
10
|
PathParamMetadata,
|
|
@@ -12,7 +12,7 @@ from orq_ai_sdk.utils import (
|
|
|
12
12
|
get_discriminator,
|
|
13
13
|
)
|
|
14
14
|
import pydantic
|
|
15
|
-
from pydantic import ConfigDict, Discriminator, Tag
|
|
15
|
+
from pydantic import ConfigDict, Discriminator, Tag, model_serializer
|
|
16
16
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
17
17
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
18
18
|
|
|
@@ -90,6 +90,22 @@ class UpdateToolRequestBodyCodeTool(BaseModel):
|
|
|
90
90
|
parameters: Optional[UpdateToolRequestBodyToolsParameters] = None
|
|
91
91
|
r"""The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format."""
|
|
92
92
|
|
|
93
|
+
@model_serializer(mode="wrap")
|
|
94
|
+
def serialize_model(self, handler):
|
|
95
|
+
optional_fields = set(["parameters"])
|
|
96
|
+
serialized = handler(self)
|
|
97
|
+
m = {}
|
|
98
|
+
|
|
99
|
+
for n, f in type(self).model_fields.items():
|
|
100
|
+
k = f.alias or n
|
|
101
|
+
val = serialized.get(k)
|
|
102
|
+
|
|
103
|
+
if val != UNSET_SENTINEL:
|
|
104
|
+
if val is not None or k not in optional_fields:
|
|
105
|
+
m[k] = val
|
|
106
|
+
|
|
107
|
+
return m
|
|
108
|
+
|
|
93
109
|
|
|
94
110
|
class UpdateCodeExecutionToolTypedDict(TypedDict):
|
|
95
111
|
r"""Updates an existing code execution tool configuration."""
|
|
@@ -140,6 +156,24 @@ class UpdateCodeExecutionTool(BaseModel):
|
|
|
140
156
|
|
|
141
157
|
code_tool: Optional[UpdateToolRequestBodyCodeTool] = None
|
|
142
158
|
|
|
159
|
+
@model_serializer(mode="wrap")
|
|
160
|
+
def serialize_model(self, handler):
|
|
161
|
+
optional_fields = set(
|
|
162
|
+
["path", "key", "display_name", "description", "status", "code_tool"]
|
|
163
|
+
)
|
|
164
|
+
serialized = handler(self)
|
|
165
|
+
m = {}
|
|
166
|
+
|
|
167
|
+
for n, f in type(self).model_fields.items():
|
|
168
|
+
k = f.alias or n
|
|
169
|
+
val = serialized.get(k)
|
|
170
|
+
|
|
171
|
+
if val != UNSET_SENTINEL:
|
|
172
|
+
if val is not None or k not in optional_fields:
|
|
173
|
+
m[k] = val
|
|
174
|
+
|
|
175
|
+
return m
|
|
176
|
+
|
|
143
177
|
|
|
144
178
|
UpdateToolRequestBodyToolsRequest4Status = Literal[
|
|
145
179
|
"live",
|
|
@@ -163,6 +197,22 @@ class UpdateToolRequestBodyHeaders(BaseModel):
|
|
|
163
197
|
|
|
164
198
|
encrypted: Optional[bool] = False
|
|
165
199
|
|
|
200
|
+
@model_serializer(mode="wrap")
|
|
201
|
+
def serialize_model(self, handler):
|
|
202
|
+
optional_fields = set(["encrypted"])
|
|
203
|
+
serialized = handler(self)
|
|
204
|
+
m = {}
|
|
205
|
+
|
|
206
|
+
for n, f in type(self).model_fields.items():
|
|
207
|
+
k = f.alias or n
|
|
208
|
+
val = serialized.get(k)
|
|
209
|
+
|
|
210
|
+
if val != UNSET_SENTINEL:
|
|
211
|
+
if val is not None or k not in optional_fields:
|
|
212
|
+
m[k] = val
|
|
213
|
+
|
|
214
|
+
return m
|
|
215
|
+
|
|
166
216
|
|
|
167
217
|
UpdateToolRequestBodyToolsRequest4McpType = Literal["object",]
|
|
168
218
|
|
|
@@ -180,6 +230,22 @@ class UpdateToolRequestBodyToolsSchema(BaseModel):
|
|
|
180
230
|
|
|
181
231
|
required: Optional[List[str]] = None
|
|
182
232
|
|
|
233
|
+
@model_serializer(mode="wrap")
|
|
234
|
+
def serialize_model(self, handler):
|
|
235
|
+
optional_fields = set(["properties", "required"])
|
|
236
|
+
serialized = handler(self)
|
|
237
|
+
m = {}
|
|
238
|
+
|
|
239
|
+
for n, f in type(self).model_fields.items():
|
|
240
|
+
k = f.alias or n
|
|
241
|
+
val = serialized.get(k)
|
|
242
|
+
|
|
243
|
+
if val != UNSET_SENTINEL:
|
|
244
|
+
if val is not None or k not in optional_fields:
|
|
245
|
+
m[k] = val
|
|
246
|
+
|
|
247
|
+
return m
|
|
248
|
+
|
|
183
249
|
|
|
184
250
|
class RequestBodyToolsTypedDict(TypedDict):
|
|
185
251
|
name: str
|
|
@@ -193,10 +259,26 @@ class RequestBodyTools(BaseModel):
|
|
|
193
259
|
|
|
194
260
|
schema_: Annotated[UpdateToolRequestBodyToolsSchema, pydantic.Field(alias="schema")]
|
|
195
261
|
|
|
196
|
-
id: Optional[str] = "
|
|
262
|
+
id: Optional[str] = "01KFTTTRDV9SJRNEYVHQ2V7GTG"
|
|
197
263
|
|
|
198
264
|
description: Optional[str] = None
|
|
199
265
|
|
|
266
|
+
@model_serializer(mode="wrap")
|
|
267
|
+
def serialize_model(self, handler):
|
|
268
|
+
optional_fields = set(["id", "description"])
|
|
269
|
+
serialized = handler(self)
|
|
270
|
+
m = {}
|
|
271
|
+
|
|
272
|
+
for n, f in type(self).model_fields.items():
|
|
273
|
+
k = f.alias or n
|
|
274
|
+
val = serialized.get(k)
|
|
275
|
+
|
|
276
|
+
if val != UNSET_SENTINEL:
|
|
277
|
+
if val is not None or k not in optional_fields:
|
|
278
|
+
m[k] = val
|
|
279
|
+
|
|
280
|
+
return m
|
|
281
|
+
|
|
200
282
|
|
|
201
283
|
UpdateToolRequestBodyConnectionType = Literal[
|
|
202
284
|
"http",
|
|
@@ -229,6 +311,22 @@ class UpdateToolRequestBodyMcp(BaseModel):
|
|
|
229
311
|
connection_type: Optional[UpdateToolRequestBodyConnectionType] = None
|
|
230
312
|
r"""The connection type used by the MCP server"""
|
|
231
313
|
|
|
314
|
+
@model_serializer(mode="wrap")
|
|
315
|
+
def serialize_model(self, handler):
|
|
316
|
+
optional_fields = set(["server_url", "headers", "tools", "connection_type"])
|
|
317
|
+
serialized = handler(self)
|
|
318
|
+
m = {}
|
|
319
|
+
|
|
320
|
+
for n, f in type(self).model_fields.items():
|
|
321
|
+
k = f.alias or n
|
|
322
|
+
val = serialized.get(k)
|
|
323
|
+
|
|
324
|
+
if val != UNSET_SENTINEL:
|
|
325
|
+
if val is not None or k not in optional_fields:
|
|
326
|
+
m[k] = val
|
|
327
|
+
|
|
328
|
+
return m
|
|
329
|
+
|
|
232
330
|
|
|
233
331
|
class UpdateMCPToolTypedDict(TypedDict):
|
|
234
332
|
r"""Updates an existing MCP tool configuration."""
|
|
@@ -279,6 +377,24 @@ class UpdateMCPTool(BaseModel):
|
|
|
279
377
|
|
|
280
378
|
mcp: Optional[UpdateToolRequestBodyMcp] = None
|
|
281
379
|
|
|
380
|
+
@model_serializer(mode="wrap")
|
|
381
|
+
def serialize_model(self, handler):
|
|
382
|
+
optional_fields = set(
|
|
383
|
+
["path", "key", "display_name", "description", "status", "mcp"]
|
|
384
|
+
)
|
|
385
|
+
serialized = handler(self)
|
|
386
|
+
m = {}
|
|
387
|
+
|
|
388
|
+
for n, f in type(self).model_fields.items():
|
|
389
|
+
k = f.alias or n
|
|
390
|
+
val = serialized.get(k)
|
|
391
|
+
|
|
392
|
+
if val != UNSET_SENTINEL:
|
|
393
|
+
if val is not None or k not in optional_fields:
|
|
394
|
+
m[k] = val
|
|
395
|
+
|
|
396
|
+
return m
|
|
397
|
+
|
|
282
398
|
|
|
283
399
|
UpdateToolRequestBodyToolsRequestStatus = Literal[
|
|
284
400
|
"live",
|
|
@@ -311,6 +427,22 @@ class UpdateToolHeaders2(BaseModel):
|
|
|
311
427
|
|
|
312
428
|
encrypted: Optional[bool] = False
|
|
313
429
|
|
|
430
|
+
@model_serializer(mode="wrap")
|
|
431
|
+
def serialize_model(self, handler):
|
|
432
|
+
optional_fields = set(["encrypted"])
|
|
433
|
+
serialized = handler(self)
|
|
434
|
+
m = {}
|
|
435
|
+
|
|
436
|
+
for n, f in type(self).model_fields.items():
|
|
437
|
+
k = f.alias or n
|
|
438
|
+
val = serialized.get(k)
|
|
439
|
+
|
|
440
|
+
if val != UNSET_SENTINEL:
|
|
441
|
+
if val is not None or k not in optional_fields:
|
|
442
|
+
m[k] = val
|
|
443
|
+
|
|
444
|
+
return m
|
|
445
|
+
|
|
314
446
|
|
|
315
447
|
UpdateToolRequestBodyToolsHeadersTypedDict = TypeAliasType(
|
|
316
448
|
"UpdateToolRequestBodyToolsHeadersTypedDict",
|
|
@@ -351,6 +483,22 @@ class UpdateToolRequestBodyBlueprint(BaseModel):
|
|
|
351
483
|
body: Optional[Dict[str, Any]] = None
|
|
352
484
|
r"""The body to send with the request."""
|
|
353
485
|
|
|
486
|
+
@model_serializer(mode="wrap")
|
|
487
|
+
def serialize_model(self, handler):
|
|
488
|
+
optional_fields = set(["headers", "body"])
|
|
489
|
+
serialized = handler(self)
|
|
490
|
+
m = {}
|
|
491
|
+
|
|
492
|
+
for n, f in type(self).model_fields.items():
|
|
493
|
+
k = f.alias or n
|
|
494
|
+
val = serialized.get(k)
|
|
495
|
+
|
|
496
|
+
if val != UNSET_SENTINEL:
|
|
497
|
+
if val is not None or k not in optional_fields:
|
|
498
|
+
m[k] = val
|
|
499
|
+
|
|
500
|
+
return m
|
|
501
|
+
|
|
354
502
|
|
|
355
503
|
UpdateToolRequestBodyToolsRequest3Type = Literal[
|
|
356
504
|
"string",
|
|
@@ -396,6 +544,22 @@ class UpdateToolRequestBodyArguments(BaseModel):
|
|
|
396
544
|
default_value: Optional[UpdateToolRequestBodyDefaultValue] = None
|
|
397
545
|
r"""The default value of the argument."""
|
|
398
546
|
|
|
547
|
+
@model_serializer(mode="wrap")
|
|
548
|
+
def serialize_model(self, handler):
|
|
549
|
+
optional_fields = set(["send_to_model", "default_value"])
|
|
550
|
+
serialized = handler(self)
|
|
551
|
+
m = {}
|
|
552
|
+
|
|
553
|
+
for n, f in type(self).model_fields.items():
|
|
554
|
+
k = f.alias or n
|
|
555
|
+
val = serialized.get(k)
|
|
556
|
+
|
|
557
|
+
if val != UNSET_SENTINEL:
|
|
558
|
+
if val is not None or k not in optional_fields:
|
|
559
|
+
m[k] = val
|
|
560
|
+
|
|
561
|
+
return m
|
|
562
|
+
|
|
399
563
|
|
|
400
564
|
class UpdateToolRequestBodyHTTPTypedDict(TypedDict):
|
|
401
565
|
blueprint: UpdateToolRequestBodyBlueprintTypedDict
|
|
@@ -411,6 +575,22 @@ class UpdateToolRequestBodyHTTP(BaseModel):
|
|
|
411
575
|
arguments: Optional[Dict[str, UpdateToolRequestBodyArguments]] = None
|
|
412
576
|
r"""The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field."""
|
|
413
577
|
|
|
578
|
+
@model_serializer(mode="wrap")
|
|
579
|
+
def serialize_model(self, handler):
|
|
580
|
+
optional_fields = set(["arguments"])
|
|
581
|
+
serialized = handler(self)
|
|
582
|
+
m = {}
|
|
583
|
+
|
|
584
|
+
for n, f in type(self).model_fields.items():
|
|
585
|
+
k = f.alias or n
|
|
586
|
+
val = serialized.get(k)
|
|
587
|
+
|
|
588
|
+
if val != UNSET_SENTINEL:
|
|
589
|
+
if val is not None or k not in optional_fields:
|
|
590
|
+
m[k] = val
|
|
591
|
+
|
|
592
|
+
return m
|
|
593
|
+
|
|
414
594
|
|
|
415
595
|
class UpdateHTTPToolTypedDict(TypedDict):
|
|
416
596
|
r"""Updates an existing HTTP tool configuration."""
|
|
@@ -461,6 +641,24 @@ class UpdateHTTPTool(BaseModel):
|
|
|
461
641
|
|
|
462
642
|
http: Optional[UpdateToolRequestBodyHTTP] = None
|
|
463
643
|
|
|
644
|
+
@model_serializer(mode="wrap")
|
|
645
|
+
def serialize_model(self, handler):
|
|
646
|
+
optional_fields = set(
|
|
647
|
+
["path", "key", "display_name", "description", "status", "http"]
|
|
648
|
+
)
|
|
649
|
+
serialized = handler(self)
|
|
650
|
+
m = {}
|
|
651
|
+
|
|
652
|
+
for n, f in type(self).model_fields.items():
|
|
653
|
+
k = f.alias or n
|
|
654
|
+
val = serialized.get(k)
|
|
655
|
+
|
|
656
|
+
if val != UNSET_SENTINEL:
|
|
657
|
+
if val is not None or k not in optional_fields:
|
|
658
|
+
m[k] = val
|
|
659
|
+
|
|
660
|
+
return m
|
|
661
|
+
|
|
464
662
|
|
|
465
663
|
UpdateToolRequestBodyToolsStatus = Literal[
|
|
466
664
|
"live",
|
|
@@ -535,6 +733,22 @@ class UpdateToolRequestBodyJSONSchema(BaseModel):
|
|
|
535
733
|
strict: Optional[bool] = None
|
|
536
734
|
r"""Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models."""
|
|
537
735
|
|
|
736
|
+
@model_serializer(mode="wrap")
|
|
737
|
+
def serialize_model(self, handler):
|
|
738
|
+
optional_fields = set(["strict"])
|
|
739
|
+
serialized = handler(self)
|
|
740
|
+
m = {}
|
|
741
|
+
|
|
742
|
+
for n, f in type(self).model_fields.items():
|
|
743
|
+
k = f.alias or n
|
|
744
|
+
val = serialized.get(k)
|
|
745
|
+
|
|
746
|
+
if val != UNSET_SENTINEL:
|
|
747
|
+
if val is not None or k not in optional_fields:
|
|
748
|
+
m[k] = val
|
|
749
|
+
|
|
750
|
+
return m
|
|
751
|
+
|
|
538
752
|
|
|
539
753
|
class UpdateJSONSchemaToolTypedDict(TypedDict):
|
|
540
754
|
r"""Updates an existing JSON Schema tool configuration."""
|
|
@@ -585,6 +799,24 @@ class UpdateJSONSchemaTool(BaseModel):
|
|
|
585
799
|
|
|
586
800
|
json_schema: Optional[UpdateToolRequestBodyJSONSchema] = None
|
|
587
801
|
|
|
802
|
+
@model_serializer(mode="wrap")
|
|
803
|
+
def serialize_model(self, handler):
|
|
804
|
+
optional_fields = set(
|
|
805
|
+
["path", "key", "display_name", "description", "status", "json_schema"]
|
|
806
|
+
)
|
|
807
|
+
serialized = handler(self)
|
|
808
|
+
m = {}
|
|
809
|
+
|
|
810
|
+
for n, f in type(self).model_fields.items():
|
|
811
|
+
k = f.alias or n
|
|
812
|
+
val = serialized.get(k)
|
|
813
|
+
|
|
814
|
+
if val != UNSET_SENTINEL:
|
|
815
|
+
if val is not None or k not in optional_fields:
|
|
816
|
+
m[k] = val
|
|
817
|
+
|
|
818
|
+
return m
|
|
819
|
+
|
|
588
820
|
|
|
589
821
|
UpdateToolRequestBodyStatus = Literal[
|
|
590
822
|
"live",
|
|
@@ -663,6 +895,22 @@ class UpdateToolRequestBodyFunction(BaseModel):
|
|
|
663
895
|
parameters: Optional[UpdateToolRequestBodyParameters] = None
|
|
664
896
|
r"""The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format."""
|
|
665
897
|
|
|
898
|
+
@model_serializer(mode="wrap")
|
|
899
|
+
def serialize_model(self, handler):
|
|
900
|
+
optional_fields = set(["description", "strict", "parameters"])
|
|
901
|
+
serialized = handler(self)
|
|
902
|
+
m = {}
|
|
903
|
+
|
|
904
|
+
for n, f in type(self).model_fields.items():
|
|
905
|
+
k = f.alias or n
|
|
906
|
+
val = serialized.get(k)
|
|
907
|
+
|
|
908
|
+
if val != UNSET_SENTINEL:
|
|
909
|
+
if val is not None or k not in optional_fields:
|
|
910
|
+
m[k] = val
|
|
911
|
+
|
|
912
|
+
return m
|
|
913
|
+
|
|
666
914
|
|
|
667
915
|
class UpdateFunctionToolTypedDict(TypedDict):
|
|
668
916
|
r"""Updates an existing function tool configuration."""
|
|
@@ -713,6 +961,24 @@ class UpdateFunctionTool(BaseModel):
|
|
|
713
961
|
|
|
714
962
|
function: Optional[UpdateToolRequestBodyFunction] = None
|
|
715
963
|
|
|
964
|
+
@model_serializer(mode="wrap")
|
|
965
|
+
def serialize_model(self, handler):
|
|
966
|
+
optional_fields = set(
|
|
967
|
+
["path", "key", "display_name", "description", "status", "function"]
|
|
968
|
+
)
|
|
969
|
+
serialized = handler(self)
|
|
970
|
+
m = {}
|
|
971
|
+
|
|
972
|
+
for n, f in type(self).model_fields.items():
|
|
973
|
+
k = f.alias or n
|
|
974
|
+
val = serialized.get(k)
|
|
975
|
+
|
|
976
|
+
if val != UNSET_SENTINEL:
|
|
977
|
+
if val is not None or k not in optional_fields:
|
|
978
|
+
m[k] = val
|
|
979
|
+
|
|
980
|
+
return m
|
|
981
|
+
|
|
716
982
|
|
|
717
983
|
UpdateToolRequestBodyTypedDict = TypeAliasType(
|
|
718
984
|
"UpdateToolRequestBodyTypedDict",
|
|
@@ -757,6 +1023,22 @@ class UpdateToolRequest(BaseModel):
|
|
|
757
1023
|
] = None
|
|
758
1024
|
r"""The tool to update"""
|
|
759
1025
|
|
|
1026
|
+
@model_serializer(mode="wrap")
|
|
1027
|
+
def serialize_model(self, handler):
|
|
1028
|
+
optional_fields = set(["RequestBody"])
|
|
1029
|
+
serialized = handler(self)
|
|
1030
|
+
m = {}
|
|
1031
|
+
|
|
1032
|
+
for n, f in type(self).model_fields.items():
|
|
1033
|
+
k = f.alias or n
|
|
1034
|
+
val = serialized.get(k)
|
|
1035
|
+
|
|
1036
|
+
if val != UNSET_SENTINEL:
|
|
1037
|
+
if val is not None or k not in optional_fields:
|
|
1038
|
+
m[k] = val
|
|
1039
|
+
|
|
1040
|
+
return m
|
|
1041
|
+
|
|
760
1042
|
|
|
761
1043
|
class UpdateToolToolsResponseBodyData(BaseModel):
|
|
762
1044
|
error: str
|
|
@@ -853,6 +1135,22 @@ class UpdateToolResponseBodyCodeTool(BaseModel):
|
|
|
853
1135
|
parameters: Optional[UpdateToolResponseBodyToolsParameters] = None
|
|
854
1136
|
r"""The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format."""
|
|
855
1137
|
|
|
1138
|
+
@model_serializer(mode="wrap")
|
|
1139
|
+
def serialize_model(self, handler):
|
|
1140
|
+
optional_fields = set(["parameters"])
|
|
1141
|
+
serialized = handler(self)
|
|
1142
|
+
m = {}
|
|
1143
|
+
|
|
1144
|
+
for n, f in type(self).model_fields.items():
|
|
1145
|
+
k = f.alias or n
|
|
1146
|
+
val = serialized.get(k)
|
|
1147
|
+
|
|
1148
|
+
if val != UNSET_SENTINEL:
|
|
1149
|
+
if val is not None or k not in optional_fields:
|
|
1150
|
+
m[k] = val
|
|
1151
|
+
|
|
1152
|
+
return m
|
|
1153
|
+
|
|
856
1154
|
|
|
857
1155
|
class UpdateToolResponseBodyCodeExecutionToolTypedDict(TypedDict):
|
|
858
1156
|
r"""Executes code snippets in a sandboxed environment, currently supporting Python."""
|
|
@@ -916,7 +1214,7 @@ class UpdateToolResponseBodyCodeExecutionTool(BaseModel):
|
|
|
916
1214
|
code_tool: UpdateToolResponseBodyCodeTool
|
|
917
1215
|
|
|
918
1216
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
919
|
-
"
|
|
1217
|
+
"tool_01KFTTTRDN3RSR1Q2T6RXFSPRH"
|
|
920
1218
|
)
|
|
921
1219
|
|
|
922
1220
|
display_name: Optional[str] = None
|
|
@@ -935,6 +1233,31 @@ class UpdateToolResponseBodyCodeExecutionTool(BaseModel):
|
|
|
935
1233
|
|
|
936
1234
|
version_hash: Optional[str] = None
|
|
937
1235
|
|
|
1236
|
+
@model_serializer(mode="wrap")
|
|
1237
|
+
def serialize_model(self, handler):
|
|
1238
|
+
optional_fields = set(
|
|
1239
|
+
[
|
|
1240
|
+
"_id",
|
|
1241
|
+
"display_name",
|
|
1242
|
+
"created_by_id",
|
|
1243
|
+
"updated_by_id",
|
|
1244
|
+
"status",
|
|
1245
|
+
"version_hash",
|
|
1246
|
+
]
|
|
1247
|
+
)
|
|
1248
|
+
serialized = handler(self)
|
|
1249
|
+
m = {}
|
|
1250
|
+
|
|
1251
|
+
for n, f in type(self).model_fields.items():
|
|
1252
|
+
k = f.alias or n
|
|
1253
|
+
val = serialized.get(k)
|
|
1254
|
+
|
|
1255
|
+
if val != UNSET_SENTINEL:
|
|
1256
|
+
if val is not None or k not in optional_fields:
|
|
1257
|
+
m[k] = val
|
|
1258
|
+
|
|
1259
|
+
return m
|
|
1260
|
+
|
|
938
1261
|
|
|
939
1262
|
UpdateToolResponseBodyToolsResponse200Status = Literal[
|
|
940
1263
|
"live",
|
|
@@ -958,6 +1281,22 @@ class UpdateToolResponseBodyHeaders(BaseModel):
|
|
|
958
1281
|
|
|
959
1282
|
encrypted: Optional[bool] = False
|
|
960
1283
|
|
|
1284
|
+
@model_serializer(mode="wrap")
|
|
1285
|
+
def serialize_model(self, handler):
|
|
1286
|
+
optional_fields = set(["encrypted"])
|
|
1287
|
+
serialized = handler(self)
|
|
1288
|
+
m = {}
|
|
1289
|
+
|
|
1290
|
+
for n, f in type(self).model_fields.items():
|
|
1291
|
+
k = f.alias or n
|
|
1292
|
+
val = serialized.get(k)
|
|
1293
|
+
|
|
1294
|
+
if val != UNSET_SENTINEL:
|
|
1295
|
+
if val is not None or k not in optional_fields:
|
|
1296
|
+
m[k] = val
|
|
1297
|
+
|
|
1298
|
+
return m
|
|
1299
|
+
|
|
961
1300
|
|
|
962
1301
|
UpdateToolResponseBodyToolsResponse200ApplicationJSON4Type = Literal["object",]
|
|
963
1302
|
|
|
@@ -975,6 +1314,22 @@ class UpdateToolResponseBodyToolsSchema(BaseModel):
|
|
|
975
1314
|
|
|
976
1315
|
required: Optional[List[str]] = None
|
|
977
1316
|
|
|
1317
|
+
@model_serializer(mode="wrap")
|
|
1318
|
+
def serialize_model(self, handler):
|
|
1319
|
+
optional_fields = set(["properties", "required"])
|
|
1320
|
+
serialized = handler(self)
|
|
1321
|
+
m = {}
|
|
1322
|
+
|
|
1323
|
+
for n, f in type(self).model_fields.items():
|
|
1324
|
+
k = f.alias or n
|
|
1325
|
+
val = serialized.get(k)
|
|
1326
|
+
|
|
1327
|
+
if val != UNSET_SENTINEL:
|
|
1328
|
+
if val is not None or k not in optional_fields:
|
|
1329
|
+
m[k] = val
|
|
1330
|
+
|
|
1331
|
+
return m
|
|
1332
|
+
|
|
978
1333
|
|
|
979
1334
|
class UpdateToolResponseBodyToolsTypedDict(TypedDict):
|
|
980
1335
|
name: str
|
|
@@ -990,10 +1345,26 @@ class UpdateToolResponseBodyTools(BaseModel):
|
|
|
990
1345
|
UpdateToolResponseBodyToolsSchema, pydantic.Field(alias="schema")
|
|
991
1346
|
]
|
|
992
1347
|
|
|
993
|
-
id: Optional[str] = "
|
|
1348
|
+
id: Optional[str] = "01KFTTTRDM5N04EQ4NJZ2WDPDM"
|
|
994
1349
|
|
|
995
1350
|
description: Optional[str] = None
|
|
996
1351
|
|
|
1352
|
+
@model_serializer(mode="wrap")
|
|
1353
|
+
def serialize_model(self, handler):
|
|
1354
|
+
optional_fields = set(["id", "description"])
|
|
1355
|
+
serialized = handler(self)
|
|
1356
|
+
m = {}
|
|
1357
|
+
|
|
1358
|
+
for n, f in type(self).model_fields.items():
|
|
1359
|
+
k = f.alias or n
|
|
1360
|
+
val = serialized.get(k)
|
|
1361
|
+
|
|
1362
|
+
if val != UNSET_SENTINEL:
|
|
1363
|
+
if val is not None or k not in optional_fields:
|
|
1364
|
+
m[k] = val
|
|
1365
|
+
|
|
1366
|
+
return m
|
|
1367
|
+
|
|
997
1368
|
|
|
998
1369
|
UpdateToolResponseBodyConnectionType = Literal[
|
|
999
1370
|
"http",
|
|
@@ -1026,6 +1397,22 @@ class UpdateToolResponseBodyMcp(BaseModel):
|
|
|
1026
1397
|
headers: Optional[Dict[str, UpdateToolResponseBodyHeaders]] = None
|
|
1027
1398
|
r"""HTTP headers for MCP server requests with encryption support"""
|
|
1028
1399
|
|
|
1400
|
+
@model_serializer(mode="wrap")
|
|
1401
|
+
def serialize_model(self, handler):
|
|
1402
|
+
optional_fields = set(["headers"])
|
|
1403
|
+
serialized = handler(self)
|
|
1404
|
+
m = {}
|
|
1405
|
+
|
|
1406
|
+
for n, f in type(self).model_fields.items():
|
|
1407
|
+
k = f.alias or n
|
|
1408
|
+
val = serialized.get(k)
|
|
1409
|
+
|
|
1410
|
+
if val != UNSET_SENTINEL:
|
|
1411
|
+
if val is not None or k not in optional_fields:
|
|
1412
|
+
m[k] = val
|
|
1413
|
+
|
|
1414
|
+
return m
|
|
1415
|
+
|
|
1029
1416
|
|
|
1030
1417
|
class UpdateToolResponseBodyMCPToolTypedDict(TypedDict):
|
|
1031
1418
|
r"""A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities."""
|
|
@@ -1089,7 +1476,7 @@ class UpdateToolResponseBodyMCPTool(BaseModel):
|
|
|
1089
1476
|
mcp: UpdateToolResponseBodyMcp
|
|
1090
1477
|
|
|
1091
1478
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1092
|
-
"
|
|
1479
|
+
"tool_01KFTTTRDCVWJRQ2AQ9G5NYM9M"
|
|
1093
1480
|
)
|
|
1094
1481
|
|
|
1095
1482
|
display_name: Optional[str] = None
|
|
@@ -1106,6 +1493,31 @@ class UpdateToolResponseBodyMCPTool(BaseModel):
|
|
|
1106
1493
|
|
|
1107
1494
|
version_hash: Optional[str] = None
|
|
1108
1495
|
|
|
1496
|
+
@model_serializer(mode="wrap")
|
|
1497
|
+
def serialize_model(self, handler):
|
|
1498
|
+
optional_fields = set(
|
|
1499
|
+
[
|
|
1500
|
+
"_id",
|
|
1501
|
+
"display_name",
|
|
1502
|
+
"created_by_id",
|
|
1503
|
+
"updated_by_id",
|
|
1504
|
+
"status",
|
|
1505
|
+
"version_hash",
|
|
1506
|
+
]
|
|
1507
|
+
)
|
|
1508
|
+
serialized = handler(self)
|
|
1509
|
+
m = {}
|
|
1510
|
+
|
|
1511
|
+
for n, f in type(self).model_fields.items():
|
|
1512
|
+
k = f.alias or n
|
|
1513
|
+
val = serialized.get(k)
|
|
1514
|
+
|
|
1515
|
+
if val != UNSET_SENTINEL:
|
|
1516
|
+
if val is not None or k not in optional_fields:
|
|
1517
|
+
m[k] = val
|
|
1518
|
+
|
|
1519
|
+
return m
|
|
1520
|
+
|
|
1109
1521
|
|
|
1110
1522
|
UpdateToolResponseBodyToolsResponseStatus = Literal[
|
|
1111
1523
|
"live",
|
|
@@ -1138,6 +1550,22 @@ class UpdateToolHeadersTools2(BaseModel):
|
|
|
1138
1550
|
|
|
1139
1551
|
encrypted: Optional[bool] = False
|
|
1140
1552
|
|
|
1553
|
+
@model_serializer(mode="wrap")
|
|
1554
|
+
def serialize_model(self, handler):
|
|
1555
|
+
optional_fields = set(["encrypted"])
|
|
1556
|
+
serialized = handler(self)
|
|
1557
|
+
m = {}
|
|
1558
|
+
|
|
1559
|
+
for n, f in type(self).model_fields.items():
|
|
1560
|
+
k = f.alias or n
|
|
1561
|
+
val = serialized.get(k)
|
|
1562
|
+
|
|
1563
|
+
if val != UNSET_SENTINEL:
|
|
1564
|
+
if val is not None or k not in optional_fields:
|
|
1565
|
+
m[k] = val
|
|
1566
|
+
|
|
1567
|
+
return m
|
|
1568
|
+
|
|
1141
1569
|
|
|
1142
1570
|
UpdateToolResponseBodyToolsHeadersTypedDict = TypeAliasType(
|
|
1143
1571
|
"UpdateToolResponseBodyToolsHeadersTypedDict",
|
|
@@ -1178,6 +1606,22 @@ class UpdateToolResponseBodyBlueprint(BaseModel):
|
|
|
1178
1606
|
body: Optional[Dict[str, Any]] = None
|
|
1179
1607
|
r"""The body to send with the request."""
|
|
1180
1608
|
|
|
1609
|
+
@model_serializer(mode="wrap")
|
|
1610
|
+
def serialize_model(self, handler):
|
|
1611
|
+
optional_fields = set(["headers", "body"])
|
|
1612
|
+
serialized = handler(self)
|
|
1613
|
+
m = {}
|
|
1614
|
+
|
|
1615
|
+
for n, f in type(self).model_fields.items():
|
|
1616
|
+
k = f.alias or n
|
|
1617
|
+
val = serialized.get(k)
|
|
1618
|
+
|
|
1619
|
+
if val != UNSET_SENTINEL:
|
|
1620
|
+
if val is not None or k not in optional_fields:
|
|
1621
|
+
m[k] = val
|
|
1622
|
+
|
|
1623
|
+
return m
|
|
1624
|
+
|
|
1181
1625
|
|
|
1182
1626
|
UpdateToolResponseBodyToolsResponse200ApplicationJSON3Type = Literal[
|
|
1183
1627
|
"string",
|
|
@@ -1223,6 +1667,22 @@ class UpdateToolResponseBodyArguments(BaseModel):
|
|
|
1223
1667
|
default_value: Optional[UpdateToolResponseBodyDefaultValue] = None
|
|
1224
1668
|
r"""The default value of the argument."""
|
|
1225
1669
|
|
|
1670
|
+
@model_serializer(mode="wrap")
|
|
1671
|
+
def serialize_model(self, handler):
|
|
1672
|
+
optional_fields = set(["send_to_model", "default_value"])
|
|
1673
|
+
serialized = handler(self)
|
|
1674
|
+
m = {}
|
|
1675
|
+
|
|
1676
|
+
for n, f in type(self).model_fields.items():
|
|
1677
|
+
k = f.alias or n
|
|
1678
|
+
val = serialized.get(k)
|
|
1679
|
+
|
|
1680
|
+
if val != UNSET_SENTINEL:
|
|
1681
|
+
if val is not None or k not in optional_fields:
|
|
1682
|
+
m[k] = val
|
|
1683
|
+
|
|
1684
|
+
return m
|
|
1685
|
+
|
|
1226
1686
|
|
|
1227
1687
|
class UpdateToolResponseBodyHTTPTypedDict(TypedDict):
|
|
1228
1688
|
blueprint: UpdateToolResponseBodyBlueprintTypedDict
|
|
@@ -1238,6 +1698,22 @@ class UpdateToolResponseBodyHTTP(BaseModel):
|
|
|
1238
1698
|
arguments: Optional[Dict[str, UpdateToolResponseBodyArguments]] = None
|
|
1239
1699
|
r"""The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field."""
|
|
1240
1700
|
|
|
1701
|
+
@model_serializer(mode="wrap")
|
|
1702
|
+
def serialize_model(self, handler):
|
|
1703
|
+
optional_fields = set(["arguments"])
|
|
1704
|
+
serialized = handler(self)
|
|
1705
|
+
m = {}
|
|
1706
|
+
|
|
1707
|
+
for n, f in type(self).model_fields.items():
|
|
1708
|
+
k = f.alias or n
|
|
1709
|
+
val = serialized.get(k)
|
|
1710
|
+
|
|
1711
|
+
if val != UNSET_SENTINEL:
|
|
1712
|
+
if val is not None or k not in optional_fields:
|
|
1713
|
+
m[k] = val
|
|
1714
|
+
|
|
1715
|
+
return m
|
|
1716
|
+
|
|
1241
1717
|
|
|
1242
1718
|
class UpdateToolResponseBodyHTTPToolTypedDict(TypedDict):
|
|
1243
1719
|
r"""Executes HTTP requests to interact with external APIs and web services using customizable blueprints."""
|
|
@@ -1301,7 +1777,7 @@ class UpdateToolResponseBodyHTTPTool(BaseModel):
|
|
|
1301
1777
|
http: UpdateToolResponseBodyHTTP
|
|
1302
1778
|
|
|
1303
1779
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1304
|
-
"
|
|
1780
|
+
"tool_01KFTTTRDAB0NDF9NBND65DKAR"
|
|
1305
1781
|
)
|
|
1306
1782
|
|
|
1307
1783
|
display_name: Optional[str] = None
|
|
@@ -1318,6 +1794,31 @@ class UpdateToolResponseBodyHTTPTool(BaseModel):
|
|
|
1318
1794
|
|
|
1319
1795
|
version_hash: Optional[str] = None
|
|
1320
1796
|
|
|
1797
|
+
@model_serializer(mode="wrap")
|
|
1798
|
+
def serialize_model(self, handler):
|
|
1799
|
+
optional_fields = set(
|
|
1800
|
+
[
|
|
1801
|
+
"_id",
|
|
1802
|
+
"display_name",
|
|
1803
|
+
"created_by_id",
|
|
1804
|
+
"updated_by_id",
|
|
1805
|
+
"status",
|
|
1806
|
+
"version_hash",
|
|
1807
|
+
]
|
|
1808
|
+
)
|
|
1809
|
+
serialized = handler(self)
|
|
1810
|
+
m = {}
|
|
1811
|
+
|
|
1812
|
+
for n, f in type(self).model_fields.items():
|
|
1813
|
+
k = f.alias or n
|
|
1814
|
+
val = serialized.get(k)
|
|
1815
|
+
|
|
1816
|
+
if val != UNSET_SENTINEL:
|
|
1817
|
+
if val is not None or k not in optional_fields:
|
|
1818
|
+
m[k] = val
|
|
1819
|
+
|
|
1820
|
+
return m
|
|
1821
|
+
|
|
1321
1822
|
|
|
1322
1823
|
UpdateToolResponseBodyToolsStatus = Literal[
|
|
1323
1824
|
"live",
|
|
@@ -1392,6 +1893,22 @@ class UpdateToolResponseBodyJSONSchema(BaseModel):
|
|
|
1392
1893
|
strict: Optional[bool] = None
|
|
1393
1894
|
r"""Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models."""
|
|
1394
1895
|
|
|
1896
|
+
@model_serializer(mode="wrap")
|
|
1897
|
+
def serialize_model(self, handler):
|
|
1898
|
+
optional_fields = set(["strict"])
|
|
1899
|
+
serialized = handler(self)
|
|
1900
|
+
m = {}
|
|
1901
|
+
|
|
1902
|
+
for n, f in type(self).model_fields.items():
|
|
1903
|
+
k = f.alias or n
|
|
1904
|
+
val = serialized.get(k)
|
|
1905
|
+
|
|
1906
|
+
if val != UNSET_SENTINEL:
|
|
1907
|
+
if val is not None or k not in optional_fields:
|
|
1908
|
+
m[k] = val
|
|
1909
|
+
|
|
1910
|
+
return m
|
|
1911
|
+
|
|
1395
1912
|
|
|
1396
1913
|
class UpdateToolResponseBodyJSONSchemaToolTypedDict(TypedDict):
|
|
1397
1914
|
r"""A tool that enforces structured output format using JSON Schema for consistent response formatting."""
|
|
@@ -1455,7 +1972,7 @@ class UpdateToolResponseBodyJSONSchemaTool(BaseModel):
|
|
|
1455
1972
|
json_schema: UpdateToolResponseBodyJSONSchema
|
|
1456
1973
|
|
|
1457
1974
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1458
|
-
"
|
|
1975
|
+
"tool_01KFTTTRD9MXJG1S572RMKFT1K"
|
|
1459
1976
|
)
|
|
1460
1977
|
|
|
1461
1978
|
display_name: Optional[str] = None
|
|
@@ -1472,6 +1989,31 @@ class UpdateToolResponseBodyJSONSchemaTool(BaseModel):
|
|
|
1472
1989
|
|
|
1473
1990
|
version_hash: Optional[str] = None
|
|
1474
1991
|
|
|
1992
|
+
@model_serializer(mode="wrap")
|
|
1993
|
+
def serialize_model(self, handler):
|
|
1994
|
+
optional_fields = set(
|
|
1995
|
+
[
|
|
1996
|
+
"_id",
|
|
1997
|
+
"display_name",
|
|
1998
|
+
"created_by_id",
|
|
1999
|
+
"updated_by_id",
|
|
2000
|
+
"status",
|
|
2001
|
+
"version_hash",
|
|
2002
|
+
]
|
|
2003
|
+
)
|
|
2004
|
+
serialized = handler(self)
|
|
2005
|
+
m = {}
|
|
2006
|
+
|
|
2007
|
+
for n, f in type(self).model_fields.items():
|
|
2008
|
+
k = f.alias or n
|
|
2009
|
+
val = serialized.get(k)
|
|
2010
|
+
|
|
2011
|
+
if val != UNSET_SENTINEL:
|
|
2012
|
+
if val is not None or k not in optional_fields:
|
|
2013
|
+
m[k] = val
|
|
2014
|
+
|
|
2015
|
+
return m
|
|
2016
|
+
|
|
1475
2017
|
|
|
1476
2018
|
UpdateToolResponseBodyStatus = Literal[
|
|
1477
2019
|
"live",
|
|
@@ -1550,6 +2092,22 @@ class UpdateToolResponseBodyFunction(BaseModel):
|
|
|
1550
2092
|
parameters: Optional[UpdateToolResponseBodyParameters] = None
|
|
1551
2093
|
r"""The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format."""
|
|
1552
2094
|
|
|
2095
|
+
@model_serializer(mode="wrap")
|
|
2096
|
+
def serialize_model(self, handler):
|
|
2097
|
+
optional_fields = set(["description", "strict", "parameters"])
|
|
2098
|
+
serialized = handler(self)
|
|
2099
|
+
m = {}
|
|
2100
|
+
|
|
2101
|
+
for n, f in type(self).model_fields.items():
|
|
2102
|
+
k = f.alias or n
|
|
2103
|
+
val = serialized.get(k)
|
|
2104
|
+
|
|
2105
|
+
if val != UNSET_SENTINEL:
|
|
2106
|
+
if val is not None or k not in optional_fields:
|
|
2107
|
+
m[k] = val
|
|
2108
|
+
|
|
2109
|
+
return m
|
|
2110
|
+
|
|
1553
2111
|
|
|
1554
2112
|
class UpdateToolResponseBodyFunctionToolTypedDict(TypedDict):
|
|
1555
2113
|
r"""A custom function tool that allows the model to call predefined functions with structured parameters."""
|
|
@@ -1613,7 +2171,7 @@ class UpdateToolResponseBodyFunctionTool(BaseModel):
|
|
|
1613
2171
|
function: UpdateToolResponseBodyFunction
|
|
1614
2172
|
|
|
1615
2173
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1616
|
-
"
|
|
2174
|
+
"tool_01KFTTTRD888GYGB03M3MVC2JX"
|
|
1617
2175
|
)
|
|
1618
2176
|
|
|
1619
2177
|
display_name: Optional[str] = None
|
|
@@ -1630,6 +2188,31 @@ class UpdateToolResponseBodyFunctionTool(BaseModel):
|
|
|
1630
2188
|
|
|
1631
2189
|
version_hash: Optional[str] = None
|
|
1632
2190
|
|
|
2191
|
+
@model_serializer(mode="wrap")
|
|
2192
|
+
def serialize_model(self, handler):
|
|
2193
|
+
optional_fields = set(
|
|
2194
|
+
[
|
|
2195
|
+
"_id",
|
|
2196
|
+
"display_name",
|
|
2197
|
+
"created_by_id",
|
|
2198
|
+
"updated_by_id",
|
|
2199
|
+
"status",
|
|
2200
|
+
"version_hash",
|
|
2201
|
+
]
|
|
2202
|
+
)
|
|
2203
|
+
serialized = handler(self)
|
|
2204
|
+
m = {}
|
|
2205
|
+
|
|
2206
|
+
for n, f in type(self).model_fields.items():
|
|
2207
|
+
k = f.alias or n
|
|
2208
|
+
val = serialized.get(k)
|
|
2209
|
+
|
|
2210
|
+
if val != UNSET_SENTINEL:
|
|
2211
|
+
if val is not None or k not in optional_fields:
|
|
2212
|
+
m[k] = val
|
|
2213
|
+
|
|
2214
|
+
return m
|
|
2215
|
+
|
|
1633
2216
|
|
|
1634
2217
|
UpdateToolResponseBodyTypedDict = TypeAliasType(
|
|
1635
2218
|
"UpdateToolResponseBodyTypedDict",
|