orq-ai-sdk 4.2.0rc48__py3-none-any.whl → 4.2.12__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/chat.py +22 -0
- orq_ai_sdk/completions.py +438 -0
- orq_ai_sdk/contacts.py +43 -886
- orq_ai_sdk/deployments.py +61 -0
- orq_ai_sdk/edits.py +364 -0
- orq_ai_sdk/embeddings.py +344 -0
- orq_ai_sdk/generations.py +370 -0
- orq_ai_sdk/images.py +28 -0
- orq_ai_sdk/models/__init__.py +3839 -424
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +768 -12
- orq_ai_sdk/models/createagentresponse.py +68 -2
- orq_ai_sdk/models/createchatcompletionop.py +538 -313
- orq_ai_sdk/models/createcompletionop.py +2078 -0
- orq_ai_sdk/models/createcontactop.py +5 -10
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +579 -0
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +715 -0
- orq_ai_sdk/models/createimageop.py +228 -82
- orq_ai_sdk/models/createimagevariationop.py +706 -0
- orq_ai_sdk/models/creatememoryop.py +4 -2
- orq_ai_sdk/models/createmoderationop.py +521 -0
- orq_ai_sdk/models/createpromptop.py +375 -6
- orq_ai_sdk/models/creatererankop.py +608 -0
- orq_ai_sdk/models/createresponseop.py +2567 -0
- orq_ai_sdk/models/createspeechop.py +466 -0
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +732 -0
- orq_ai_sdk/models/createtranslationop.py +702 -0
- orq_ai_sdk/models/deploymentgetconfigop.py +17 -7
- orq_ai_sdk/models/deploymentsop.py +1 -0
- orq_ai_sdk/models/deploymentstreamop.py +7 -0
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallmemoriesop.py +4 -2
- orq_ai_sdk/models/getallpromptsop.py +188 -3
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +17 -17
- orq_ai_sdk/models/getonepromptop.py +188 -3
- orq_ai_sdk/models/getpromptversionop.py +188 -3
- orq_ai_sdk/models/invokedeploymentrequest.py +11 -4
- orq_ai_sdk/models/listagentsop.py +372 -0
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listmodelsop.py +1 -0
- orq_ai_sdk/models/listpromptversionsop.py +188 -3
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/post_v2_router_ocrop.py +408 -0
- orq_ai_sdk/models/publiccontact.py +9 -3
- orq_ai_sdk/models/publicidentity.py +62 -0
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/responsedoneevent.py +14 -11
- orq_ai_sdk/models/retrieveagentrequestop.py +382 -0
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievememoryop.py +4 -2
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +379 -9
- orq_ai_sdk/models/streamrunagentop.py +385 -9
- orq_ai_sdk/models/updateagentop.py +770 -12
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatememoryop.py +4 -2
- orq_ai_sdk/models/updatepromptop.py +375 -6
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/moderations.py +218 -0
- orq_ai_sdk/orq_completions.py +666 -0
- orq_ai_sdk/orq_responses.py +398 -0
- orq_ai_sdk/rerank.py +330 -0
- orq_ai_sdk/router.py +89 -641
- orq_ai_sdk/speech.py +333 -0
- orq_ai_sdk/transcriptions.py +416 -0
- orq_ai_sdk/translations.py +384 -0
- orq_ai_sdk/variations.py +364 -0
- orq_ai_sdk-4.2.12.dist-info/METADATA +888 -0
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/RECORD +98 -75
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/WHEEL +1 -1
- orq_ai_sdk/models/deletecontactop.py +0 -44
- orq_ai_sdk/models/listcontactsop.py +0 -265
- orq_ai_sdk/models/retrievecontactop.py +0 -142
- orq_ai_sdk/models/updatecontactop.py +0 -233
- orq_ai_sdk-4.2.0rc48.dist-info/METADATA +0 -788
- {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/top_level.txt +0 -0
|
@@ -10,6 +10,7 @@ from .imagecontentpartschema import (
|
|
|
10
10
|
ImageContentPartSchema,
|
|
11
11
|
ImageContentPartSchemaTypedDict,
|
|
12
12
|
)
|
|
13
|
+
from .publicidentity import PublicIdentity, PublicIdentityTypedDict
|
|
13
14
|
from .reasoningpartschema import ReasoningPartSchema, ReasoningPartSchemaTypedDict
|
|
14
15
|
from .redactedreasoningpartschema import (
|
|
15
16
|
RedactedReasoningPartSchema,
|
|
@@ -2062,6 +2063,8 @@ class DeploymentGetConfigRequestBodyTypedDict(TypedDict):
|
|
|
2062
2063
|
r"""A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment."""
|
|
2063
2064
|
messages: NotRequired[List[DeploymentGetConfigMessagesTypedDict]]
|
|
2064
2065
|
r"""A list of messages to send to the deployment."""
|
|
2066
|
+
identity: NotRequired[PublicIdentityTypedDict]
|
|
2067
|
+
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
2065
2068
|
file_ids: NotRequired[List[str]]
|
|
2066
2069
|
r"""A list of file IDs that are associated with the deployment request."""
|
|
2067
2070
|
metadata: NotRequired[Dict[str, Any]]
|
|
@@ -2092,6 +2095,9 @@ class DeploymentGetConfigRequestBody(BaseModel):
|
|
|
2092
2095
|
messages: Optional[List[DeploymentGetConfigMessages]] = None
|
|
2093
2096
|
r"""A list of messages to send to the deployment."""
|
|
2094
2097
|
|
|
2098
|
+
identity: Optional[PublicIdentity] = None
|
|
2099
|
+
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
2100
|
+
|
|
2095
2101
|
file_ids: Optional[List[str]] = None
|
|
2096
2102
|
r"""A list of file IDs that are associated with the deployment request."""
|
|
2097
2103
|
|
|
@@ -2119,6 +2125,7 @@ class DeploymentGetConfigRequestBody(BaseModel):
|
|
|
2119
2125
|
"context",
|
|
2120
2126
|
"prefix_messages",
|
|
2121
2127
|
"messages",
|
|
2128
|
+
"identity",
|
|
2122
2129
|
"file_ids",
|
|
2123
2130
|
"metadata",
|
|
2124
2131
|
"extra_params",
|
|
@@ -2150,6 +2157,7 @@ DeploymentGetConfigType = Literal[
|
|
|
2150
2157
|
"tts",
|
|
2151
2158
|
"stt",
|
|
2152
2159
|
"rerank",
|
|
2160
|
+
"ocr",
|
|
2153
2161
|
"moderation",
|
|
2154
2162
|
"vision",
|
|
2155
2163
|
]
|
|
@@ -2214,13 +2222,13 @@ class DeploymentGetConfig2File(BaseModel):
|
|
|
2214
2222
|
return m
|
|
2215
2223
|
|
|
2216
2224
|
|
|
2217
|
-
class
|
|
2225
|
+
class DeploymentGetConfig23TypedDict(TypedDict):
|
|
2218
2226
|
type: DeploymentGetConfig2DeploymentsResponse200ApplicationJSONType
|
|
2219
2227
|
r"""The type of the content part. Always `file`."""
|
|
2220
2228
|
file: DeploymentGetConfig2FileTypedDict
|
|
2221
2229
|
|
|
2222
2230
|
|
|
2223
|
-
class
|
|
2231
|
+
class DeploymentGetConfig23(BaseModel):
|
|
2224
2232
|
type: DeploymentGetConfig2DeploymentsResponse200ApplicationJSONType
|
|
2225
2233
|
r"""The type of the content part. Always `file`."""
|
|
2226
2234
|
|
|
@@ -2302,7 +2310,9 @@ class DeploymentGetConfig21(BaseModel):
|
|
|
2302
2310
|
DeploymentGetConfigContentDeploymentsResponse2TypedDict = TypeAliasType(
|
|
2303
2311
|
"DeploymentGetConfigContentDeploymentsResponse2TypedDict",
|
|
2304
2312
|
Union[
|
|
2305
|
-
DeploymentGetConfig21TypedDict,
|
|
2313
|
+
DeploymentGetConfig21TypedDict,
|
|
2314
|
+
DeploymentGetConfig22TypedDict,
|
|
2315
|
+
DeploymentGetConfig23TypedDict,
|
|
2306
2316
|
],
|
|
2307
2317
|
)
|
|
2308
2318
|
|
|
@@ -2311,7 +2321,7 @@ DeploymentGetConfigContentDeploymentsResponse2 = Annotated[
|
|
|
2311
2321
|
Union[
|
|
2312
2322
|
Annotated[DeploymentGetConfig21, Tag("text")],
|
|
2313
2323
|
Annotated[DeploymentGetConfig22, Tag("image_url")],
|
|
2314
|
-
Annotated[
|
|
2324
|
+
Annotated[DeploymentGetConfig23, Tag("file")],
|
|
2315
2325
|
],
|
|
2316
2326
|
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
2317
2327
|
]
|
|
@@ -2597,7 +2607,7 @@ PhotoRealVersion = Literal[
|
|
|
2597
2607
|
r"""The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider"""
|
|
2598
2608
|
|
|
2599
2609
|
|
|
2600
|
-
|
|
2610
|
+
DeploymentGetConfigEncodingFormat = Literal[
|
|
2601
2611
|
"float",
|
|
2602
2612
|
"base64",
|
|
2603
2613
|
]
|
|
@@ -2668,7 +2678,7 @@ class DeploymentGetConfigParametersTypedDict(TypedDict):
|
|
|
2668
2678
|
"""
|
|
2669
2679
|
photo_real_version: NotRequired[PhotoRealVersion]
|
|
2670
2680
|
r"""The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider"""
|
|
2671
|
-
encoding_format: NotRequired[
|
|
2681
|
+
encoding_format: NotRequired[DeploymentGetConfigEncodingFormat]
|
|
2672
2682
|
r"""The format to return the embeddings"""
|
|
2673
2683
|
reasoning_effort: NotRequired[DeploymentGetConfigReasoningEffort]
|
|
2674
2684
|
r"""Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."""
|
|
@@ -2743,7 +2753,7 @@ class DeploymentGetConfigParameters(BaseModel):
|
|
|
2743
2753
|
] = None
|
|
2744
2754
|
r"""The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider"""
|
|
2745
2755
|
|
|
2746
|
-
encoding_format: Optional[
|
|
2756
|
+
encoding_format: Optional[DeploymentGetConfigEncodingFormat] = None
|
|
2747
2757
|
r"""The format to return the embeddings"""
|
|
2748
2758
|
|
|
2749
2759
|
reasoning_effort: Annotated[
|
|
@@ -10,6 +10,7 @@ from .imagecontentpartschema import (
|
|
|
10
10
|
ImageContentPartSchema,
|
|
11
11
|
ImageContentPartSchemaTypedDict,
|
|
12
12
|
)
|
|
13
|
+
from .publicidentity import PublicIdentity, PublicIdentityTypedDict
|
|
13
14
|
from .reasoningpartschema import ReasoningPartSchema, ReasoningPartSchemaTypedDict
|
|
14
15
|
from .redactedreasoningpartschema import (
|
|
15
16
|
RedactedReasoningPartSchema,
|
|
@@ -2089,6 +2090,8 @@ class DeploymentStreamRequestBodyTypedDict(TypedDict):
|
|
|
2089
2090
|
r"""A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment."""
|
|
2090
2091
|
messages: NotRequired[List[DeploymentStreamMessagesTypedDict]]
|
|
2091
2092
|
r"""A list of messages to send to the deployment."""
|
|
2093
|
+
identity: NotRequired[PublicIdentityTypedDict]
|
|
2094
|
+
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
2092
2095
|
file_ids: NotRequired[List[str]]
|
|
2093
2096
|
r"""A list of file IDs that are associated with the deployment request."""
|
|
2094
2097
|
metadata: NotRequired[Dict[str, Any]]
|
|
@@ -2119,6 +2122,9 @@ class DeploymentStreamRequestBody(BaseModel):
|
|
|
2119
2122
|
messages: Optional[List[DeploymentStreamMessages]] = None
|
|
2120
2123
|
r"""A list of messages to send to the deployment."""
|
|
2121
2124
|
|
|
2125
|
+
identity: Optional[PublicIdentity] = None
|
|
2126
|
+
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
2127
|
+
|
|
2122
2128
|
file_ids: Optional[List[str]] = None
|
|
2123
2129
|
r"""A list of file IDs that are associated with the deployment request."""
|
|
2124
2130
|
|
|
@@ -2146,6 +2152,7 @@ class DeploymentStreamRequestBody(BaseModel):
|
|
|
2146
2152
|
"context",
|
|
2147
2153
|
"prefix_messages",
|
|
2148
2154
|
"messages",
|
|
2155
|
+
"identity",
|
|
2149
2156
|
"file_ids",
|
|
2150
2157
|
"metadata",
|
|
2151
2158
|
"extra_params",
|
orq_ai_sdk/models/filegetop.py
CHANGED
|
@@ -64,7 +64,7 @@ class FileGetResponseBody(BaseModel):
|
|
|
64
64
|
workspace_id: str
|
|
65
65
|
r"""The id of the resource"""
|
|
66
66
|
|
|
67
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
67
|
+
created: Optional[datetime] = parse_datetime("2026-01-27T09:10:37.406Z")
|
|
68
68
|
r"""The date and time the resource was created"""
|
|
69
69
|
|
|
70
70
|
@model_serializer(mode="wrap")
|
orq_ai_sdk/models/filelistop.py
CHANGED
|
@@ -96,7 +96,7 @@ class FileListData(BaseModel):
|
|
|
96
96
|
workspace_id: str
|
|
97
97
|
r"""The id of the resource"""
|
|
98
98
|
|
|
99
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
99
|
+
created: Optional[datetime] = parse_datetime("2026-01-27T09:10:37.406Z")
|
|
100
100
|
r"""The date and time the resource was created"""
|
|
101
101
|
|
|
102
102
|
@model_serializer(mode="wrap")
|
|
@@ -134,7 +134,7 @@ class FileUploadResponseBody(BaseModel):
|
|
|
134
134
|
workspace_id: str
|
|
135
135
|
r"""The id of the resource"""
|
|
136
136
|
|
|
137
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
137
|
+
created: Optional[datetime] = parse_datetime("2026-01-27T09:10:37.406Z")
|
|
138
138
|
r"""The date and time the resource was created"""
|
|
139
139
|
|
|
140
140
|
@model_serializer(mode="wrap")
|
|
@@ -186,7 +186,7 @@ class GenerateConversationNameResponseBody(BaseModel):
|
|
|
186
186
|
r"""Unix timestamp in milliseconds when the conversation was last modified."""
|
|
187
187
|
|
|
188
188
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
189
|
-
"
|
|
189
|
+
"conv_01kfzbgfts2m52dtfg1pny1vh2"
|
|
190
190
|
)
|
|
191
191
|
r"""Unique conversation identifier with `conv_` prefix."""
|
|
192
192
|
|
|
@@ -80,8 +80,9 @@ GetAllMemoriesObject = Literal["list",]
|
|
|
80
80
|
|
|
81
81
|
class GetAllMemoriesDataTypedDict(TypedDict):
|
|
82
82
|
id: str
|
|
83
|
+
r"""Unique identifier for the memory. This is automatically generated by the system."""
|
|
83
84
|
entity_id: str
|
|
84
|
-
r"""This
|
|
85
|
+
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."""
|
|
85
86
|
created: str
|
|
86
87
|
updated: str
|
|
87
88
|
store_id: str
|
|
@@ -94,6 +95,7 @@ class GetAllMemoriesDataTypedDict(TypedDict):
|
|
|
94
95
|
|
|
95
96
|
class GetAllMemoriesData(BaseModel):
|
|
96
97
|
id: Annotated[str, pydantic.Field(alias="_id")]
|
|
98
|
+
r"""Unique identifier for the memory. This is automatically generated by the system."""
|
|
97
99
|
|
|
98
100
|
entity_id: Annotated[
|
|
99
101
|
str,
|
|
@@ -101,7 +103,7 @@ class GetAllMemoriesData(BaseModel):
|
|
|
101
103
|
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
102
104
|
),
|
|
103
105
|
]
|
|
104
|
-
r"""This
|
|
106
|
+
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."""
|
|
105
107
|
|
|
106
108
|
created: str
|
|
107
109
|
|
|
@@ -104,6 +104,7 @@ GetAllPromptsModelType = Literal[
|
|
|
104
104
|
"tts",
|
|
105
105
|
"stt",
|
|
106
106
|
"rerank",
|
|
107
|
+
"ocr",
|
|
107
108
|
"moderation",
|
|
108
109
|
"vision",
|
|
109
110
|
]
|
|
@@ -703,7 +704,7 @@ GetAllPromptsContent = TypeAliasType(
|
|
|
703
704
|
r"""The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios."""
|
|
704
705
|
|
|
705
706
|
|
|
706
|
-
|
|
707
|
+
GetAllPromptsPromptsResponseType = Literal["function",]
|
|
707
708
|
|
|
708
709
|
|
|
709
710
|
class GetAllPromptsFunctionTypedDict(TypedDict):
|
|
@@ -720,14 +721,14 @@ class GetAllPromptsFunction(BaseModel):
|
|
|
720
721
|
|
|
721
722
|
|
|
722
723
|
class GetAllPromptsToolCallsTypedDict(TypedDict):
|
|
723
|
-
type:
|
|
724
|
+
type: GetAllPromptsPromptsResponseType
|
|
724
725
|
function: GetAllPromptsFunctionTypedDict
|
|
725
726
|
id: NotRequired[str]
|
|
726
727
|
index: NotRequired[float]
|
|
727
728
|
|
|
728
729
|
|
|
729
730
|
class GetAllPromptsToolCalls(BaseModel):
|
|
730
|
-
type:
|
|
731
|
+
type: GetAllPromptsPromptsResponseType
|
|
731
732
|
|
|
732
733
|
function: GetAllPromptsFunction
|
|
733
734
|
|
|
@@ -1234,6 +1235,154 @@ class GetAllPromptsGuardrails(BaseModel):
|
|
|
1234
1235
|
r"""Determines whether the guardrail runs on the input (user message) or output (model response)."""
|
|
1235
1236
|
|
|
1236
1237
|
|
|
1238
|
+
class GetAllPromptsFallbacksTypedDict(TypedDict):
|
|
1239
|
+
model: str
|
|
1240
|
+
r"""Fallback model identifier"""
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
class GetAllPromptsFallbacks(BaseModel):
|
|
1244
|
+
model: str
|
|
1245
|
+
r"""Fallback model identifier"""
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
class GetAllPromptsRetryTypedDict(TypedDict):
|
|
1249
|
+
r"""Retry configuration for the request"""
|
|
1250
|
+
|
|
1251
|
+
count: NotRequired[float]
|
|
1252
|
+
r"""Number of retry attempts (1-5)"""
|
|
1253
|
+
on_codes: NotRequired[List[float]]
|
|
1254
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
class GetAllPromptsRetry(BaseModel):
|
|
1258
|
+
r"""Retry configuration for the request"""
|
|
1259
|
+
|
|
1260
|
+
count: Optional[float] = 3
|
|
1261
|
+
r"""Number of retry attempts (1-5)"""
|
|
1262
|
+
|
|
1263
|
+
on_codes: Optional[List[float]] = None
|
|
1264
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
1265
|
+
|
|
1266
|
+
@model_serializer(mode="wrap")
|
|
1267
|
+
def serialize_model(self, handler):
|
|
1268
|
+
optional_fields = set(["count", "on_codes"])
|
|
1269
|
+
serialized = handler(self)
|
|
1270
|
+
m = {}
|
|
1271
|
+
|
|
1272
|
+
for n, f in type(self).model_fields.items():
|
|
1273
|
+
k = f.alias or n
|
|
1274
|
+
val = serialized.get(k)
|
|
1275
|
+
|
|
1276
|
+
if val != UNSET_SENTINEL:
|
|
1277
|
+
if val is not None or k not in optional_fields:
|
|
1278
|
+
m[k] = val
|
|
1279
|
+
|
|
1280
|
+
return m
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
GetAllPromptsPromptsType = Literal["exact_match",]
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
class GetAllPromptsCacheTypedDict(TypedDict):
|
|
1287
|
+
r"""Cache configuration for the request."""
|
|
1288
|
+
|
|
1289
|
+
type: GetAllPromptsPromptsType
|
|
1290
|
+
ttl: NotRequired[float]
|
|
1291
|
+
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
class GetAllPromptsCache(BaseModel):
|
|
1295
|
+
r"""Cache configuration for the request."""
|
|
1296
|
+
|
|
1297
|
+
type: GetAllPromptsPromptsType
|
|
1298
|
+
|
|
1299
|
+
ttl: Optional[float] = 1800
|
|
1300
|
+
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
1301
|
+
|
|
1302
|
+
@model_serializer(mode="wrap")
|
|
1303
|
+
def serialize_model(self, handler):
|
|
1304
|
+
optional_fields = set(["ttl"])
|
|
1305
|
+
serialized = handler(self)
|
|
1306
|
+
m = {}
|
|
1307
|
+
|
|
1308
|
+
for n, f in type(self).model_fields.items():
|
|
1309
|
+
k = f.alias or n
|
|
1310
|
+
val = serialized.get(k)
|
|
1311
|
+
|
|
1312
|
+
if val != UNSET_SENTINEL:
|
|
1313
|
+
if val is not None or k not in optional_fields:
|
|
1314
|
+
m[k] = val
|
|
1315
|
+
|
|
1316
|
+
return m
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
GetAllPromptsLoadBalancerType = Literal["weight_based",]
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
class GetAllPromptsLoadBalancerModelsTypedDict(TypedDict):
|
|
1323
|
+
model: str
|
|
1324
|
+
r"""Model identifier for load balancing"""
|
|
1325
|
+
weight: NotRequired[float]
|
|
1326
|
+
r"""Weight assigned to this model for load balancing"""
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
class GetAllPromptsLoadBalancerModels(BaseModel):
|
|
1330
|
+
model: str
|
|
1331
|
+
r"""Model identifier for load balancing"""
|
|
1332
|
+
|
|
1333
|
+
weight: Optional[float] = 0.5
|
|
1334
|
+
r"""Weight assigned to this model for load balancing"""
|
|
1335
|
+
|
|
1336
|
+
@model_serializer(mode="wrap")
|
|
1337
|
+
def serialize_model(self, handler):
|
|
1338
|
+
optional_fields = set(["weight"])
|
|
1339
|
+
serialized = handler(self)
|
|
1340
|
+
m = {}
|
|
1341
|
+
|
|
1342
|
+
for n, f in type(self).model_fields.items():
|
|
1343
|
+
k = f.alias or n
|
|
1344
|
+
val = serialized.get(k)
|
|
1345
|
+
|
|
1346
|
+
if val != UNSET_SENTINEL:
|
|
1347
|
+
if val is not None or k not in optional_fields:
|
|
1348
|
+
m[k] = val
|
|
1349
|
+
|
|
1350
|
+
return m
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
class GetAllPromptsLoadBalancer1TypedDict(TypedDict):
|
|
1354
|
+
type: GetAllPromptsLoadBalancerType
|
|
1355
|
+
models: List[GetAllPromptsLoadBalancerModelsTypedDict]
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
class GetAllPromptsLoadBalancer1(BaseModel):
|
|
1359
|
+
type: GetAllPromptsLoadBalancerType
|
|
1360
|
+
|
|
1361
|
+
models: List[GetAllPromptsLoadBalancerModels]
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
GetAllPromptsLoadBalancerTypedDict = GetAllPromptsLoadBalancer1TypedDict
|
|
1365
|
+
r"""Load balancer configuration for the request."""
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
GetAllPromptsLoadBalancer = GetAllPromptsLoadBalancer1
|
|
1369
|
+
r"""Load balancer configuration for the request."""
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
class GetAllPromptsTimeoutTypedDict(TypedDict):
|
|
1373
|
+
r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
|
|
1374
|
+
|
|
1375
|
+
call_timeout: float
|
|
1376
|
+
r"""Timeout value in milliseconds"""
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
class GetAllPromptsTimeout(BaseModel):
|
|
1380
|
+
r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
|
|
1381
|
+
|
|
1382
|
+
call_timeout: float
|
|
1383
|
+
r"""Timeout value in milliseconds"""
|
|
1384
|
+
|
|
1385
|
+
|
|
1237
1386
|
GetAllPromptsMessagesPromptsResponse200Role = Literal["tool",]
|
|
1238
1387
|
r"""The role of the messages author, in this case tool."""
|
|
1239
1388
|
|
|
@@ -1810,6 +1959,8 @@ GetAllPromptsPromptsMessages = Annotated[
|
|
|
1810
1959
|
class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
1811
1960
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
1812
1961
|
|
|
1962
|
+
name: NotRequired[str]
|
|
1963
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
1813
1964
|
audio: NotRequired[Nullable[GetAllPromptsAudioTypedDict]]
|
|
1814
1965
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1815
1966
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -1864,6 +2015,16 @@ class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
|
1864
2015
|
r"""Output types that you would like the model to generate. Most models are capable of generating text, which is the default: [\"text\"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: [\"text\", \"audio\"]."""
|
|
1865
2016
|
guardrails: NotRequired[List[GetAllPromptsGuardrailsTypedDict]]
|
|
1866
2017
|
r"""A list of guardrails to apply to the request."""
|
|
2018
|
+
fallbacks: NotRequired[List[GetAllPromptsFallbacksTypedDict]]
|
|
2019
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
2020
|
+
retry: NotRequired[GetAllPromptsRetryTypedDict]
|
|
2021
|
+
r"""Retry configuration for the request"""
|
|
2022
|
+
cache: NotRequired[GetAllPromptsCacheTypedDict]
|
|
2023
|
+
r"""Cache configuration for the request."""
|
|
2024
|
+
load_balancer: NotRequired[GetAllPromptsLoadBalancerTypedDict]
|
|
2025
|
+
r"""Load balancer configuration for the request."""
|
|
2026
|
+
timeout: NotRequired[GetAllPromptsTimeoutTypedDict]
|
|
2027
|
+
r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
|
|
1867
2028
|
messages: NotRequired[List[GetAllPromptsPromptsMessagesTypedDict]]
|
|
1868
2029
|
r"""Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content."""
|
|
1869
2030
|
model: NotRequired[Nullable[str]]
|
|
@@ -1874,6 +2035,9 @@ class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
|
1874
2035
|
class GetAllPromptsPromptField(BaseModel):
|
|
1875
2036
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
1876
2037
|
|
|
2038
|
+
name: Optional[str] = None
|
|
2039
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
2040
|
+
|
|
1877
2041
|
audio: OptionalNullable[GetAllPromptsAudio] = UNSET
|
|
1878
2042
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1879
2043
|
|
|
@@ -1950,6 +2114,21 @@ class GetAllPromptsPromptField(BaseModel):
|
|
|
1950
2114
|
guardrails: Optional[List[GetAllPromptsGuardrails]] = None
|
|
1951
2115
|
r"""A list of guardrails to apply to the request."""
|
|
1952
2116
|
|
|
2117
|
+
fallbacks: Optional[List[GetAllPromptsFallbacks]] = None
|
|
2118
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
2119
|
+
|
|
2120
|
+
retry: Optional[GetAllPromptsRetry] = None
|
|
2121
|
+
r"""Retry configuration for the request"""
|
|
2122
|
+
|
|
2123
|
+
cache: Optional[GetAllPromptsCache] = None
|
|
2124
|
+
r"""Cache configuration for the request."""
|
|
2125
|
+
|
|
2126
|
+
load_balancer: Optional[GetAllPromptsLoadBalancer] = None
|
|
2127
|
+
r"""Load balancer configuration for the request."""
|
|
2128
|
+
|
|
2129
|
+
timeout: Optional[GetAllPromptsTimeout] = None
|
|
2130
|
+
r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
|
|
2131
|
+
|
|
1953
2132
|
messages: Optional[List[GetAllPromptsPromptsMessages]] = None
|
|
1954
2133
|
r"""Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content."""
|
|
1955
2134
|
|
|
@@ -1962,6 +2141,7 @@ class GetAllPromptsPromptField(BaseModel):
|
|
|
1962
2141
|
def serialize_model(self, handler):
|
|
1963
2142
|
optional_fields = set(
|
|
1964
2143
|
[
|
|
2144
|
+
"name",
|
|
1965
2145
|
"audio",
|
|
1966
2146
|
"frequency_penalty",
|
|
1967
2147
|
"max_tokens",
|
|
@@ -1984,6 +2164,11 @@ class GetAllPromptsPromptField(BaseModel):
|
|
|
1984
2164
|
"parallel_tool_calls",
|
|
1985
2165
|
"modalities",
|
|
1986
2166
|
"guardrails",
|
|
2167
|
+
"fallbacks",
|
|
2168
|
+
"retry",
|
|
2169
|
+
"cache",
|
|
2170
|
+
"load_balancer",
|
|
2171
|
+
"timeout",
|
|
1987
2172
|
"messages",
|
|
1988
2173
|
"model",
|
|
1989
2174
|
"version",
|
|
@@ -209,7 +209,7 @@ class DataCodeExecutionTool(BaseModel):
|
|
|
209
209
|
code_tool: DataCodeTool
|
|
210
210
|
|
|
211
211
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
212
|
-
"
|
|
212
|
+
"tool_01KFZBGG3YKQA9FE4J5E9D0G4Q"
|
|
213
213
|
)
|
|
214
214
|
|
|
215
215
|
display_name: Optional[str] = None
|
|
@@ -336,7 +336,7 @@ class DataTools(BaseModel):
|
|
|
336
336
|
|
|
337
337
|
schema_: Annotated[GetAllToolsDataSchema, pydantic.Field(alias="schema")]
|
|
338
338
|
|
|
339
|
-
id: Optional[str] = "
|
|
339
|
+
id: Optional[str] = "01KFZBGG3XBD8MXJQAP3XHY5AV"
|
|
340
340
|
|
|
341
341
|
description: Optional[str] = None
|
|
342
342
|
|
|
@@ -467,7 +467,7 @@ class DataMCPTool(BaseModel):
|
|
|
467
467
|
mcp: DataMcp
|
|
468
468
|
|
|
469
469
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
470
|
-
"
|
|
470
|
+
"tool_01KFZBGG3WTDPD2S8CHVNHE9CY"
|
|
471
471
|
)
|
|
472
472
|
|
|
473
473
|
display_name: Optional[str] = None
|
|
@@ -765,7 +765,7 @@ class DataHTTPTool(BaseModel):
|
|
|
765
765
|
http: GetAllToolsDataHTTP
|
|
766
766
|
|
|
767
767
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
768
|
-
"
|
|
768
|
+
"tool_01KFZBGG3TM7MTA8RWWSYPJPZC"
|
|
769
769
|
)
|
|
770
770
|
|
|
771
771
|
display_name: Optional[str] = None
|
|
@@ -960,7 +960,7 @@ class DataJSONSchemaTool(BaseModel):
|
|
|
960
960
|
json_schema: DataJSONSchema
|
|
961
961
|
|
|
962
962
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
963
|
-
"
|
|
963
|
+
"tool_01KFZBGG3S9SQMZ3WH9DND7QHH"
|
|
964
964
|
)
|
|
965
965
|
|
|
966
966
|
display_name: Optional[str] = None
|
|
@@ -1159,7 +1159,7 @@ class DataFunctionTool(BaseModel):
|
|
|
1159
1159
|
function: GetAllToolsDataFunction
|
|
1160
1160
|
|
|
1161
1161
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1162
|
-
"
|
|
1162
|
+
"tool_01KFZBGG3H8FDQK4TPYFPC56PJ"
|
|
1163
1163
|
)
|
|
1164
1164
|
|
|
1165
1165
|
display_name: Optional[str] = None
|
orq_ai_sdk/models/getevalsop.py
CHANGED
|
@@ -79,7 +79,7 @@ class GetEvalsEvalsResponseBody(OrqError):
|
|
|
79
79
|
object.__setattr__(self, "data", data)
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Object = Literal["list",]
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
GetEvalsGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyData72Type = Literal[
|
|
@@ -221,9 +221,9 @@ class DataTypescript(BaseModel):
|
|
|
221
221
|
|
|
222
222
|
key: str
|
|
223
223
|
|
|
224
|
-
created: Optional[str] = "2026-01-
|
|
224
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
225
225
|
|
|
226
|
-
updated: Optional[str] = "2026-01-
|
|
226
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
227
227
|
|
|
228
228
|
guardrail_config: Optional[
|
|
229
229
|
GetEvalsDataEvalsResponse200ApplicationJSONGuardrailConfig
|
|
@@ -397,9 +397,9 @@ class DataRagas(BaseModel):
|
|
|
397
397
|
|
|
398
398
|
model: str
|
|
399
399
|
|
|
400
|
-
created: Optional[str] = "2026-01-
|
|
400
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
401
401
|
|
|
402
|
-
updated: Optional[str] = "2026-01-
|
|
402
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
403
403
|
|
|
404
404
|
guardrail_config: Optional[GetEvalsDataEvalsResponse200GuardrailConfig] = None
|
|
405
405
|
|
|
@@ -1072,9 +1072,9 @@ class DataFunction(BaseModel):
|
|
|
1072
1072
|
|
|
1073
1073
|
key: str
|
|
1074
1074
|
|
|
1075
|
-
created: Optional[str] = "2026-01-
|
|
1075
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1076
1076
|
|
|
1077
|
-
updated: Optional[str] = "2026-01-
|
|
1077
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1078
1078
|
|
|
1079
1079
|
guardrail_config: Optional[GetEvalsDataEvalsResponseGuardrailConfig] = None
|
|
1080
1080
|
|
|
@@ -1227,9 +1227,9 @@ class DataPython(BaseModel):
|
|
|
1227
1227
|
|
|
1228
1228
|
key: str
|
|
1229
1229
|
|
|
1230
|
-
created: Optional[str] = "2026-01-
|
|
1230
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1231
1231
|
|
|
1232
|
-
updated: Optional[str] = "2026-01-
|
|
1232
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1233
1233
|
|
|
1234
1234
|
guardrail_config: Optional[GetEvalsDataEvalsGuardrailConfig] = None
|
|
1235
1235
|
|
|
@@ -1392,9 +1392,9 @@ class DataHTTP(BaseModel):
|
|
|
1392
1392
|
|
|
1393
1393
|
key: str
|
|
1394
1394
|
|
|
1395
|
-
created: Optional[str] = "2026-01-
|
|
1395
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1396
1396
|
|
|
1397
|
-
updated: Optional[str] = "2026-01-
|
|
1397
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1398
1398
|
|
|
1399
1399
|
guardrail_config: Optional[GetEvalsDataGuardrailConfig] = None
|
|
1400
1400
|
|
|
@@ -1603,9 +1603,9 @@ class DataJSON(BaseModel):
|
|
|
1603
1603
|
|
|
1604
1604
|
key: str
|
|
1605
1605
|
|
|
1606
|
-
created: Optional[str] = "2026-01-
|
|
1606
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1607
1607
|
|
|
1608
|
-
updated: Optional[str] = "2026-01-
|
|
1608
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1609
1609
|
|
|
1610
1610
|
guardrail_config: Optional[DataGuardrailConfig] = None
|
|
1611
1611
|
|
|
@@ -1735,9 +1735,9 @@ class DataLLM(BaseModel):
|
|
|
1735
1735
|
|
|
1736
1736
|
model: str
|
|
1737
1737
|
|
|
1738
|
-
created: Optional[str] = "2026-01-
|
|
1738
|
+
created: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1739
1739
|
|
|
1740
|
-
updated: Optional[str] = "2026-01-
|
|
1740
|
+
updated: Optional[str] = "2026-01-27T09:10:36.045Z"
|
|
1741
1741
|
|
|
1742
1742
|
guardrail_config: Optional[
|
|
1743
1743
|
GetEvalsDataEvalsResponse200ApplicationJSONResponseBodyGuardrailConfig
|
|
@@ -1791,7 +1791,7 @@ GetEvalsData = Annotated[
|
|
|
1791
1791
|
class GetEvalsResponseBodyTypedDict(TypedDict):
|
|
1792
1792
|
r"""Returns a list of evals"""
|
|
1793
1793
|
|
|
1794
|
-
object:
|
|
1794
|
+
object: Object
|
|
1795
1795
|
data: List[GetEvalsDataTypedDict]
|
|
1796
1796
|
has_more: bool
|
|
1797
1797
|
|
|
@@ -1799,7 +1799,7 @@ class GetEvalsResponseBodyTypedDict(TypedDict):
|
|
|
1799
1799
|
class GetEvalsResponseBody(BaseModel):
|
|
1800
1800
|
r"""Returns a list of evals"""
|
|
1801
1801
|
|
|
1802
|
-
object:
|
|
1802
|
+
object: Object
|
|
1803
1803
|
|
|
1804
1804
|
data: List[GetEvalsData]
|
|
1805
1805
|
|