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
|
@@ -37,8 +37,9 @@ class RetrieveMemoryResponseBodyTypedDict(TypedDict):
|
|
|
37
37
|
r"""Memory successfully retrieved."""
|
|
38
38
|
|
|
39
39
|
id: str
|
|
40
|
+
r"""Unique identifier for the memory. This is automatically generated by the system."""
|
|
40
41
|
entity_id: str
|
|
41
|
-
r"""This
|
|
42
|
+
r"""Customer provided entity ID for the memory. This is used to link the memory to a specific user/company/session/etc. Has to be unique within the memory store."""
|
|
42
43
|
created: str
|
|
43
44
|
updated: str
|
|
44
45
|
store_id: str
|
|
@@ -53,6 +54,7 @@ class RetrieveMemoryResponseBody(BaseModel):
|
|
|
53
54
|
r"""Memory successfully retrieved."""
|
|
54
55
|
|
|
55
56
|
id: Annotated[str, pydantic.Field(alias="_id")]
|
|
57
|
+
r"""Unique identifier for the memory. This is automatically generated by the system."""
|
|
56
58
|
|
|
57
59
|
entity_id: Annotated[
|
|
58
60
|
str,
|
|
@@ -60,7 +62,7 @@ class RetrieveMemoryResponseBody(BaseModel):
|
|
|
60
62
|
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
61
63
|
),
|
|
62
64
|
]
|
|
63
|
-
r"""This
|
|
65
|
+
r"""Customer provided entity ID for the memory. This is used to link the memory to a specific user/company/session/etc. Has to be unique within the memory store."""
|
|
64
66
|
|
|
65
67
|
created: str
|
|
66
68
|
|
|
@@ -79,30 +81,25 @@ class RetrieveMemoryResponseBody(BaseModel):
|
|
|
79
81
|
|
|
80
82
|
@model_serializer(mode="wrap")
|
|
81
83
|
def serialize_model(self, handler):
|
|
82
|
-
optional_fields = ["created_by_id", "updated_by_id"]
|
|
83
|
-
nullable_fields = ["created_by_id", "updated_by_id"]
|
|
84
|
-
null_default_fields = []
|
|
85
|
-
|
|
84
|
+
optional_fields = set(["created_by_id", "updated_by_id"])
|
|
85
|
+
nullable_fields = set(["created_by_id", "updated_by_id"])
|
|
86
86
|
serialized = handler(self)
|
|
87
|
-
|
|
88
87
|
m = {}
|
|
89
88
|
|
|
90
89
|
for n, f in type(self).model_fields.items():
|
|
91
90
|
k = f.alias or n
|
|
92
91
|
val = serialized.get(k)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
):
|
|
106
|
-
m[k] = val
|
|
92
|
+
is_nullable_and_explicitly_set = (
|
|
93
|
+
k in nullable_fields
|
|
94
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
if val != UNSET_SENTINEL:
|
|
98
|
+
if (
|
|
99
|
+
val is not None
|
|
100
|
+
or k not in optional_fields
|
|
101
|
+
or is_nullable_and_explicitly_set
|
|
102
|
+
):
|
|
103
|
+
m[k] = val
|
|
107
104
|
|
|
108
105
|
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 Optional
|
|
8
9
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
10
|
|
|
@@ -80,3 +81,19 @@ class RetrieveMemoryStoreResponseBody(BaseModel):
|
|
|
80
81
|
|
|
81
82
|
ttl: Optional[float] = None
|
|
82
83
|
r"""The default time to live of every memory document created within the memory store. Useful to control if the documents in the memory should be store for short or long term."""
|
|
84
|
+
|
|
85
|
+
@model_serializer(mode="wrap")
|
|
86
|
+
def serialize_model(self, handler):
|
|
87
|
+
optional_fields = set(["created_by_id", "updated_by_id", "ttl"])
|
|
88
|
+
serialized = handler(self)
|
|
89
|
+
m = {}
|
|
90
|
+
|
|
91
|
+
for n, f in type(self).model_fields.items():
|
|
92
|
+
k = f.alias or n
|
|
93
|
+
val = serialized.get(k)
|
|
94
|
+
|
|
95
|
+
if val != UNSET_SENTINEL:
|
|
96
|
+
if val is not None or k not in optional_fields:
|
|
97
|
+
m[k] = val
|
|
98
|
+
|
|
99
|
+
return m
|
|
@@ -1,10 +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, get_discriminator
|
|
6
6
|
import pydantic
|
|
7
|
-
from pydantic import ConfigDict, Discriminator, Tag
|
|
7
|
+
from pydantic import ConfigDict, Discriminator, Tag, model_serializer
|
|
8
8
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
9
9
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
10
10
|
|
|
@@ -92,6 +92,22 @@ class RetrieveToolResponseBodyCodeTool(BaseModel):
|
|
|
92
92
|
parameters: Optional[RetrieveToolResponseBodyToolsParameters] = None
|
|
93
93
|
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."""
|
|
94
94
|
|
|
95
|
+
@model_serializer(mode="wrap")
|
|
96
|
+
def serialize_model(self, handler):
|
|
97
|
+
optional_fields = set(["parameters"])
|
|
98
|
+
serialized = handler(self)
|
|
99
|
+
m = {}
|
|
100
|
+
|
|
101
|
+
for n, f in type(self).model_fields.items():
|
|
102
|
+
k = f.alias or n
|
|
103
|
+
val = serialized.get(k)
|
|
104
|
+
|
|
105
|
+
if val != UNSET_SENTINEL:
|
|
106
|
+
if val is not None or k not in optional_fields:
|
|
107
|
+
m[k] = val
|
|
108
|
+
|
|
109
|
+
return m
|
|
110
|
+
|
|
95
111
|
|
|
96
112
|
class RetrieveToolResponseBodyCodeExecutionToolTypedDict(TypedDict):
|
|
97
113
|
r"""Executes code snippets in a sandboxed environment, currently supporting Python."""
|
|
@@ -155,7 +171,7 @@ class RetrieveToolResponseBodyCodeExecutionTool(BaseModel):
|
|
|
155
171
|
code_tool: RetrieveToolResponseBodyCodeTool
|
|
156
172
|
|
|
157
173
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
158
|
-
"
|
|
174
|
+
"tool_01KFTTTREGP1JWV76905JS06NQ"
|
|
159
175
|
)
|
|
160
176
|
|
|
161
177
|
display_name: Optional[str] = None
|
|
@@ -174,6 +190,31 @@ class RetrieveToolResponseBodyCodeExecutionTool(BaseModel):
|
|
|
174
190
|
|
|
175
191
|
version_hash: Optional[str] = None
|
|
176
192
|
|
|
193
|
+
@model_serializer(mode="wrap")
|
|
194
|
+
def serialize_model(self, handler):
|
|
195
|
+
optional_fields = set(
|
|
196
|
+
[
|
|
197
|
+
"_id",
|
|
198
|
+
"display_name",
|
|
199
|
+
"created_by_id",
|
|
200
|
+
"updated_by_id",
|
|
201
|
+
"status",
|
|
202
|
+
"version_hash",
|
|
203
|
+
]
|
|
204
|
+
)
|
|
205
|
+
serialized = handler(self)
|
|
206
|
+
m = {}
|
|
207
|
+
|
|
208
|
+
for n, f in type(self).model_fields.items():
|
|
209
|
+
k = f.alias or n
|
|
210
|
+
val = serialized.get(k)
|
|
211
|
+
|
|
212
|
+
if val != UNSET_SENTINEL:
|
|
213
|
+
if val is not None or k not in optional_fields:
|
|
214
|
+
m[k] = val
|
|
215
|
+
|
|
216
|
+
return m
|
|
217
|
+
|
|
177
218
|
|
|
178
219
|
RetrieveToolResponseBodyToolsResponse200Status = Literal[
|
|
179
220
|
"live",
|
|
@@ -197,6 +238,22 @@ class RetrieveToolResponseBodyHeaders(BaseModel):
|
|
|
197
238
|
|
|
198
239
|
encrypted: Optional[bool] = False
|
|
199
240
|
|
|
241
|
+
@model_serializer(mode="wrap")
|
|
242
|
+
def serialize_model(self, handler):
|
|
243
|
+
optional_fields = set(["encrypted"])
|
|
244
|
+
serialized = handler(self)
|
|
245
|
+
m = {}
|
|
246
|
+
|
|
247
|
+
for n, f in type(self).model_fields.items():
|
|
248
|
+
k = f.alias or n
|
|
249
|
+
val = serialized.get(k)
|
|
250
|
+
|
|
251
|
+
if val != UNSET_SENTINEL:
|
|
252
|
+
if val is not None or k not in optional_fields:
|
|
253
|
+
m[k] = val
|
|
254
|
+
|
|
255
|
+
return m
|
|
256
|
+
|
|
200
257
|
|
|
201
258
|
RetrieveToolResponseBodyToolsResponse200ApplicationJSON4Type = Literal["object",]
|
|
202
259
|
|
|
@@ -214,6 +271,22 @@ class RetrieveToolResponseBodyToolsSchema(BaseModel):
|
|
|
214
271
|
|
|
215
272
|
required: Optional[List[str]] = None
|
|
216
273
|
|
|
274
|
+
@model_serializer(mode="wrap")
|
|
275
|
+
def serialize_model(self, handler):
|
|
276
|
+
optional_fields = set(["properties", "required"])
|
|
277
|
+
serialized = handler(self)
|
|
278
|
+
m = {}
|
|
279
|
+
|
|
280
|
+
for n, f in type(self).model_fields.items():
|
|
281
|
+
k = f.alias or n
|
|
282
|
+
val = serialized.get(k)
|
|
283
|
+
|
|
284
|
+
if val != UNSET_SENTINEL:
|
|
285
|
+
if val is not None or k not in optional_fields:
|
|
286
|
+
m[k] = val
|
|
287
|
+
|
|
288
|
+
return m
|
|
289
|
+
|
|
217
290
|
|
|
218
291
|
class RetrieveToolResponseBodyToolsTypedDict(TypedDict):
|
|
219
292
|
name: str
|
|
@@ -229,10 +302,26 @@ class RetrieveToolResponseBodyTools(BaseModel):
|
|
|
229
302
|
RetrieveToolResponseBodyToolsSchema, pydantic.Field(alias="schema")
|
|
230
303
|
]
|
|
231
304
|
|
|
232
|
-
id: Optional[str] = "
|
|
305
|
+
id: Optional[str] = "01KFTTTREFD1RNWNBKSW95SGWP"
|
|
233
306
|
|
|
234
307
|
description: Optional[str] = None
|
|
235
308
|
|
|
309
|
+
@model_serializer(mode="wrap")
|
|
310
|
+
def serialize_model(self, handler):
|
|
311
|
+
optional_fields = set(["id", "description"])
|
|
312
|
+
serialized = handler(self)
|
|
313
|
+
m = {}
|
|
314
|
+
|
|
315
|
+
for n, f in type(self).model_fields.items():
|
|
316
|
+
k = f.alias or n
|
|
317
|
+
val = serialized.get(k)
|
|
318
|
+
|
|
319
|
+
if val != UNSET_SENTINEL:
|
|
320
|
+
if val is not None or k not in optional_fields:
|
|
321
|
+
m[k] = val
|
|
322
|
+
|
|
323
|
+
return m
|
|
324
|
+
|
|
236
325
|
|
|
237
326
|
RetrieveToolResponseBodyConnectionType = Literal[
|
|
238
327
|
"http",
|
|
@@ -265,6 +354,22 @@ class RetrieveToolResponseBodyMcp(BaseModel):
|
|
|
265
354
|
headers: Optional[Dict[str, RetrieveToolResponseBodyHeaders]] = None
|
|
266
355
|
r"""HTTP headers for MCP server requests with encryption support"""
|
|
267
356
|
|
|
357
|
+
@model_serializer(mode="wrap")
|
|
358
|
+
def serialize_model(self, handler):
|
|
359
|
+
optional_fields = set(["headers"])
|
|
360
|
+
serialized = handler(self)
|
|
361
|
+
m = {}
|
|
362
|
+
|
|
363
|
+
for n, f in type(self).model_fields.items():
|
|
364
|
+
k = f.alias or n
|
|
365
|
+
val = serialized.get(k)
|
|
366
|
+
|
|
367
|
+
if val != UNSET_SENTINEL:
|
|
368
|
+
if val is not None or k not in optional_fields:
|
|
369
|
+
m[k] = val
|
|
370
|
+
|
|
371
|
+
return m
|
|
372
|
+
|
|
268
373
|
|
|
269
374
|
class RetrieveToolResponseBodyMCPToolTypedDict(TypedDict):
|
|
270
375
|
r"""A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities."""
|
|
@@ -328,7 +433,7 @@ class RetrieveToolResponseBodyMCPTool(BaseModel):
|
|
|
328
433
|
mcp: RetrieveToolResponseBodyMcp
|
|
329
434
|
|
|
330
435
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
331
|
-
"
|
|
436
|
+
"tool_01KFTTTREE3T78VQ9KK2XRJAHA"
|
|
332
437
|
)
|
|
333
438
|
|
|
334
439
|
display_name: Optional[str] = None
|
|
@@ -345,6 +450,31 @@ class RetrieveToolResponseBodyMCPTool(BaseModel):
|
|
|
345
450
|
|
|
346
451
|
version_hash: Optional[str] = None
|
|
347
452
|
|
|
453
|
+
@model_serializer(mode="wrap")
|
|
454
|
+
def serialize_model(self, handler):
|
|
455
|
+
optional_fields = set(
|
|
456
|
+
[
|
|
457
|
+
"_id",
|
|
458
|
+
"display_name",
|
|
459
|
+
"created_by_id",
|
|
460
|
+
"updated_by_id",
|
|
461
|
+
"status",
|
|
462
|
+
"version_hash",
|
|
463
|
+
]
|
|
464
|
+
)
|
|
465
|
+
serialized = handler(self)
|
|
466
|
+
m = {}
|
|
467
|
+
|
|
468
|
+
for n, f in type(self).model_fields.items():
|
|
469
|
+
k = f.alias or n
|
|
470
|
+
val = serialized.get(k)
|
|
471
|
+
|
|
472
|
+
if val != UNSET_SENTINEL:
|
|
473
|
+
if val is not None or k not in optional_fields:
|
|
474
|
+
m[k] = val
|
|
475
|
+
|
|
476
|
+
return m
|
|
477
|
+
|
|
348
478
|
|
|
349
479
|
RetrieveToolResponseBodyToolsResponseStatus = Literal[
|
|
350
480
|
"live",
|
|
@@ -377,6 +507,22 @@ class RetrieveToolHeaders2(BaseModel):
|
|
|
377
507
|
|
|
378
508
|
encrypted: Optional[bool] = False
|
|
379
509
|
|
|
510
|
+
@model_serializer(mode="wrap")
|
|
511
|
+
def serialize_model(self, handler):
|
|
512
|
+
optional_fields = set(["encrypted"])
|
|
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
|
+
|
|
380
526
|
|
|
381
527
|
RetrieveToolResponseBodyToolsHeadersTypedDict = TypeAliasType(
|
|
382
528
|
"RetrieveToolResponseBodyToolsHeadersTypedDict",
|
|
@@ -417,6 +563,22 @@ class RetrieveToolResponseBodyBlueprint(BaseModel):
|
|
|
417
563
|
body: Optional[Dict[str, Any]] = None
|
|
418
564
|
r"""The body to send with the request."""
|
|
419
565
|
|
|
566
|
+
@model_serializer(mode="wrap")
|
|
567
|
+
def serialize_model(self, handler):
|
|
568
|
+
optional_fields = set(["headers", "body"])
|
|
569
|
+
serialized = handler(self)
|
|
570
|
+
m = {}
|
|
571
|
+
|
|
572
|
+
for n, f in type(self).model_fields.items():
|
|
573
|
+
k = f.alias or n
|
|
574
|
+
val = serialized.get(k)
|
|
575
|
+
|
|
576
|
+
if val != UNSET_SENTINEL:
|
|
577
|
+
if val is not None or k not in optional_fields:
|
|
578
|
+
m[k] = val
|
|
579
|
+
|
|
580
|
+
return m
|
|
581
|
+
|
|
420
582
|
|
|
421
583
|
RetrieveToolResponseBodyToolsResponse200ApplicationJSON3Type = Literal[
|
|
422
584
|
"string",
|
|
@@ -462,6 +624,22 @@ class RetrieveToolResponseBodyArguments(BaseModel):
|
|
|
462
624
|
default_value: Optional[RetrieveToolResponseBodyDefaultValue] = None
|
|
463
625
|
r"""The default value of the argument."""
|
|
464
626
|
|
|
627
|
+
@model_serializer(mode="wrap")
|
|
628
|
+
def serialize_model(self, handler):
|
|
629
|
+
optional_fields = set(["send_to_model", "default_value"])
|
|
630
|
+
serialized = handler(self)
|
|
631
|
+
m = {}
|
|
632
|
+
|
|
633
|
+
for n, f in type(self).model_fields.items():
|
|
634
|
+
k = f.alias or n
|
|
635
|
+
val = serialized.get(k)
|
|
636
|
+
|
|
637
|
+
if val != UNSET_SENTINEL:
|
|
638
|
+
if val is not None or k not in optional_fields:
|
|
639
|
+
m[k] = val
|
|
640
|
+
|
|
641
|
+
return m
|
|
642
|
+
|
|
465
643
|
|
|
466
644
|
class RetrieveToolResponseBodyHTTPTypedDict(TypedDict):
|
|
467
645
|
blueprint: RetrieveToolResponseBodyBlueprintTypedDict
|
|
@@ -477,6 +655,22 @@ class RetrieveToolResponseBodyHTTP(BaseModel):
|
|
|
477
655
|
arguments: Optional[Dict[str, RetrieveToolResponseBodyArguments]] = None
|
|
478
656
|
r"""The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field."""
|
|
479
657
|
|
|
658
|
+
@model_serializer(mode="wrap")
|
|
659
|
+
def serialize_model(self, handler):
|
|
660
|
+
optional_fields = set(["arguments"])
|
|
661
|
+
serialized = handler(self)
|
|
662
|
+
m = {}
|
|
663
|
+
|
|
664
|
+
for n, f in type(self).model_fields.items():
|
|
665
|
+
k = f.alias or n
|
|
666
|
+
val = serialized.get(k)
|
|
667
|
+
|
|
668
|
+
if val != UNSET_SENTINEL:
|
|
669
|
+
if val is not None or k not in optional_fields:
|
|
670
|
+
m[k] = val
|
|
671
|
+
|
|
672
|
+
return m
|
|
673
|
+
|
|
480
674
|
|
|
481
675
|
class RetrieveToolResponseBodyHTTPToolTypedDict(TypedDict):
|
|
482
676
|
r"""Executes HTTP requests to interact with external APIs and web services using customizable blueprints."""
|
|
@@ -540,7 +734,7 @@ class RetrieveToolResponseBodyHTTPTool(BaseModel):
|
|
|
540
734
|
http: RetrieveToolResponseBodyHTTP
|
|
541
735
|
|
|
542
736
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
543
|
-
"
|
|
737
|
+
"tool_01KFTTTREBXRKDDB8R0KZTKHY4"
|
|
544
738
|
)
|
|
545
739
|
|
|
546
740
|
display_name: Optional[str] = None
|
|
@@ -557,6 +751,31 @@ class RetrieveToolResponseBodyHTTPTool(BaseModel):
|
|
|
557
751
|
|
|
558
752
|
version_hash: Optional[str] = None
|
|
559
753
|
|
|
754
|
+
@model_serializer(mode="wrap")
|
|
755
|
+
def serialize_model(self, handler):
|
|
756
|
+
optional_fields = set(
|
|
757
|
+
[
|
|
758
|
+
"_id",
|
|
759
|
+
"display_name",
|
|
760
|
+
"created_by_id",
|
|
761
|
+
"updated_by_id",
|
|
762
|
+
"status",
|
|
763
|
+
"version_hash",
|
|
764
|
+
]
|
|
765
|
+
)
|
|
766
|
+
serialized = handler(self)
|
|
767
|
+
m = {}
|
|
768
|
+
|
|
769
|
+
for n, f in type(self).model_fields.items():
|
|
770
|
+
k = f.alias or n
|
|
771
|
+
val = serialized.get(k)
|
|
772
|
+
|
|
773
|
+
if val != UNSET_SENTINEL:
|
|
774
|
+
if val is not None or k not in optional_fields:
|
|
775
|
+
m[k] = val
|
|
776
|
+
|
|
777
|
+
return m
|
|
778
|
+
|
|
560
779
|
|
|
561
780
|
RetrieveToolResponseBodyToolsStatus = Literal[
|
|
562
781
|
"live",
|
|
@@ -631,6 +850,22 @@ class RetrieveToolResponseBodyJSONSchema(BaseModel):
|
|
|
631
850
|
strict: Optional[bool] = None
|
|
632
851
|
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."""
|
|
633
852
|
|
|
853
|
+
@model_serializer(mode="wrap")
|
|
854
|
+
def serialize_model(self, handler):
|
|
855
|
+
optional_fields = set(["strict"])
|
|
856
|
+
serialized = handler(self)
|
|
857
|
+
m = {}
|
|
858
|
+
|
|
859
|
+
for n, f in type(self).model_fields.items():
|
|
860
|
+
k = f.alias or n
|
|
861
|
+
val = serialized.get(k)
|
|
862
|
+
|
|
863
|
+
if val != UNSET_SENTINEL:
|
|
864
|
+
if val is not None or k not in optional_fields:
|
|
865
|
+
m[k] = val
|
|
866
|
+
|
|
867
|
+
return m
|
|
868
|
+
|
|
634
869
|
|
|
635
870
|
class RetrieveToolResponseBodyJSONSchemaToolTypedDict(TypedDict):
|
|
636
871
|
r"""A tool that enforces structured output format using JSON Schema for consistent response formatting."""
|
|
@@ -694,7 +929,7 @@ class RetrieveToolResponseBodyJSONSchemaTool(BaseModel):
|
|
|
694
929
|
json_schema: RetrieveToolResponseBodyJSONSchema
|
|
695
930
|
|
|
696
931
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
697
|
-
"
|
|
932
|
+
"tool_01KFTTTRE94TRP29WC91FTGTZ1"
|
|
698
933
|
)
|
|
699
934
|
|
|
700
935
|
display_name: Optional[str] = None
|
|
@@ -711,6 +946,31 @@ class RetrieveToolResponseBodyJSONSchemaTool(BaseModel):
|
|
|
711
946
|
|
|
712
947
|
version_hash: Optional[str] = None
|
|
713
948
|
|
|
949
|
+
@model_serializer(mode="wrap")
|
|
950
|
+
def serialize_model(self, handler):
|
|
951
|
+
optional_fields = set(
|
|
952
|
+
[
|
|
953
|
+
"_id",
|
|
954
|
+
"display_name",
|
|
955
|
+
"created_by_id",
|
|
956
|
+
"updated_by_id",
|
|
957
|
+
"status",
|
|
958
|
+
"version_hash",
|
|
959
|
+
]
|
|
960
|
+
)
|
|
961
|
+
serialized = handler(self)
|
|
962
|
+
m = {}
|
|
963
|
+
|
|
964
|
+
for n, f in type(self).model_fields.items():
|
|
965
|
+
k = f.alias or n
|
|
966
|
+
val = serialized.get(k)
|
|
967
|
+
|
|
968
|
+
if val != UNSET_SENTINEL:
|
|
969
|
+
if val is not None or k not in optional_fields:
|
|
970
|
+
m[k] = val
|
|
971
|
+
|
|
972
|
+
return m
|
|
973
|
+
|
|
714
974
|
|
|
715
975
|
RetrieveToolResponseBodyStatus = Literal[
|
|
716
976
|
"live",
|
|
@@ -789,6 +1049,22 @@ class RetrieveToolResponseBodyFunction(BaseModel):
|
|
|
789
1049
|
parameters: Optional[RetrieveToolResponseBodyParameters] = None
|
|
790
1050
|
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."""
|
|
791
1051
|
|
|
1052
|
+
@model_serializer(mode="wrap")
|
|
1053
|
+
def serialize_model(self, handler):
|
|
1054
|
+
optional_fields = set(["description", "strict", "parameters"])
|
|
1055
|
+
serialized = handler(self)
|
|
1056
|
+
m = {}
|
|
1057
|
+
|
|
1058
|
+
for n, f in type(self).model_fields.items():
|
|
1059
|
+
k = f.alias or n
|
|
1060
|
+
val = serialized.get(k)
|
|
1061
|
+
|
|
1062
|
+
if val != UNSET_SENTINEL:
|
|
1063
|
+
if val is not None or k not in optional_fields:
|
|
1064
|
+
m[k] = val
|
|
1065
|
+
|
|
1066
|
+
return m
|
|
1067
|
+
|
|
792
1068
|
|
|
793
1069
|
class RetrieveToolResponseBodyFunctionToolTypedDict(TypedDict):
|
|
794
1070
|
r"""A custom function tool that allows the model to call predefined functions with structured parameters."""
|
|
@@ -852,7 +1128,7 @@ class RetrieveToolResponseBodyFunctionTool(BaseModel):
|
|
|
852
1128
|
function: RetrieveToolResponseBodyFunction
|
|
853
1129
|
|
|
854
1130
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
855
|
-
"
|
|
1131
|
+
"tool_01KFTTTRE7AR2Z7YEBR2X63N32"
|
|
856
1132
|
)
|
|
857
1133
|
|
|
858
1134
|
display_name: Optional[str] = None
|
|
@@ -869,6 +1145,31 @@ class RetrieveToolResponseBodyFunctionTool(BaseModel):
|
|
|
869
1145
|
|
|
870
1146
|
version_hash: Optional[str] = None
|
|
871
1147
|
|
|
1148
|
+
@model_serializer(mode="wrap")
|
|
1149
|
+
def serialize_model(self, handler):
|
|
1150
|
+
optional_fields = set(
|
|
1151
|
+
[
|
|
1152
|
+
"_id",
|
|
1153
|
+
"display_name",
|
|
1154
|
+
"created_by_id",
|
|
1155
|
+
"updated_by_id",
|
|
1156
|
+
"status",
|
|
1157
|
+
"version_hash",
|
|
1158
|
+
]
|
|
1159
|
+
)
|
|
1160
|
+
serialized = handler(self)
|
|
1161
|
+
m = {}
|
|
1162
|
+
|
|
1163
|
+
for n, f in type(self).model_fields.items():
|
|
1164
|
+
k = f.alias or n
|
|
1165
|
+
val = serialized.get(k)
|
|
1166
|
+
|
|
1167
|
+
if val != UNSET_SENTINEL:
|
|
1168
|
+
if val is not None or k not in optional_fields:
|
|
1169
|
+
m[k] = val
|
|
1170
|
+
|
|
1171
|
+
return m
|
|
1172
|
+
|
|
872
1173
|
|
|
873
1174
|
RetrieveToolResponseBodyTypedDict = TypeAliasType(
|
|
874
1175
|
"RetrieveToolResponseBodyTypedDict",
|