mistralai 1.10.1__py3-none-any.whl → 1.12.0__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.
- mistralai/_version.py +3 -3
- mistralai/accesses.py +22 -12
- mistralai/agents.py +88 -44
- mistralai/audio.py +20 -0
- mistralai/basesdk.py +6 -0
- mistralai/chat.py +96 -40
- mistralai/classifiers.py +35 -22
- mistralai/conversations.py +234 -72
- mistralai/documents.py +72 -26
- mistralai/embeddings.py +17 -8
- mistralai/extra/__init__.py +48 -0
- mistralai/extra/exceptions.py +49 -4
- mistralai/extra/realtime/__init__.py +25 -0
- mistralai/extra/realtime/connection.py +207 -0
- mistralai/extra/realtime/transcription.py +271 -0
- mistralai/files.py +64 -24
- mistralai/fim.py +20 -12
- mistralai/httpclient.py +0 -1
- mistralai/jobs.py +65 -26
- mistralai/libraries.py +20 -10
- mistralai/mistral_agents.py +825 -34
- mistralai/mistral_jobs.py +33 -14
- mistralai/models/__init__.py +119 -0
- mistralai/models/agent.py +1 -1
- mistralai/models/agentaliasresponse.py +23 -0
- mistralai/models/agentconversation.py +15 -5
- mistralai/models/agenthandoffdoneevent.py +1 -1
- mistralai/models/agenthandoffentry.py +3 -2
- mistralai/models/agenthandoffstartedevent.py +1 -1
- mistralai/models/agents_api_v1_agents_create_or_update_aliasop.py +26 -0
- mistralai/models/agents_api_v1_agents_get_versionop.py +21 -0
- mistralai/models/agents_api_v1_agents_getop.py +12 -3
- mistralai/models/agents_api_v1_agents_list_version_aliasesop.py +16 -0
- mistralai/models/agents_api_v1_agents_list_versionsop.py +33 -0
- mistralai/models/agents_api_v1_agents_listop.py +4 -0
- mistralai/models/agentscompletionrequest.py +2 -5
- mistralai/models/agentscompletionstreamrequest.py +2 -5
- mistralai/models/archiveftmodelout.py +1 -1
- mistralai/models/assistantmessage.py +1 -1
- mistralai/models/audiochunk.py +1 -1
- mistralai/models/audioencoding.py +6 -1
- mistralai/models/audioformat.py +2 -4
- mistralai/models/audiotranscriptionrequest.py +8 -0
- mistralai/models/audiotranscriptionrequeststream.py +8 -0
- mistralai/models/basemodelcard.py +1 -1
- mistralai/models/batchjobin.py +2 -4
- mistralai/models/batchjobout.py +1 -1
- mistralai/models/batchjobsout.py +1 -1
- mistralai/models/chatcompletionchoice.py +10 -5
- mistralai/models/chatcompletionrequest.py +2 -5
- mistralai/models/chatcompletionstreamrequest.py +2 -5
- mistralai/models/classifierdetailedjobout.py +4 -2
- mistralai/models/classifierftmodelout.py +3 -2
- mistralai/models/classifierjobout.py +4 -2
- mistralai/models/codeinterpretertool.py +1 -1
- mistralai/models/completiondetailedjobout.py +5 -2
- mistralai/models/completionftmodelout.py +3 -2
- mistralai/models/completionjobout.py +5 -2
- mistralai/models/completionresponsestreamchoice.py +9 -8
- mistralai/models/conversationappendrequest.py +4 -1
- mistralai/models/conversationappendstreamrequest.py +4 -1
- mistralai/models/conversationhistory.py +2 -1
- mistralai/models/conversationmessages.py +1 -1
- mistralai/models/conversationrequest.py +13 -3
- mistralai/models/conversationresponse.py +2 -1
- mistralai/models/conversationrestartrequest.py +22 -5
- mistralai/models/conversationrestartstreamrequest.py +24 -5
- mistralai/models/conversationstreamrequest.py +17 -3
- mistralai/models/documentlibrarytool.py +1 -1
- mistralai/models/documenturlchunk.py +1 -1
- mistralai/models/embeddingdtype.py +7 -1
- mistralai/models/encodingformat.py +4 -1
- mistralai/models/entitytype.py +8 -1
- mistralai/models/filepurpose.py +8 -1
- mistralai/models/files_api_routes_list_filesop.py +12 -12
- mistralai/models/files_api_routes_upload_fileop.py +2 -6
- mistralai/models/fileschema.py +3 -5
- mistralai/models/finetuneablemodeltype.py +4 -1
- mistralai/models/ftclassifierlossfunction.py +4 -1
- mistralai/models/ftmodelcard.py +1 -1
- mistralai/models/functioncallentry.py +3 -2
- mistralai/models/functioncallevent.py +1 -1
- mistralai/models/functionresultentry.py +3 -2
- mistralai/models/functiontool.py +1 -1
- mistralai/models/githubrepositoryin.py +1 -1
- mistralai/models/githubrepositoryout.py +1 -1
- mistralai/models/httpvalidationerror.py +4 -2
- mistralai/models/imagegenerationtool.py +1 -1
- mistralai/models/imageurlchunk.py +1 -1
- mistralai/models/jobsout.py +1 -1
- mistralai/models/legacyjobmetadataout.py +1 -1
- mistralai/models/messageinputentry.py +9 -3
- mistralai/models/messageoutputentry.py +6 -3
- mistralai/models/messageoutputevent.py +4 -2
- mistralai/models/mistralerror.py +11 -7
- mistralai/models/mistralpromptmode.py +5 -1
- mistralai/models/modelcapabilities.py +3 -0
- mistralai/models/modelconversation.py +1 -1
- mistralai/models/no_response_error.py +5 -1
- mistralai/models/ocrrequest.py +11 -1
- mistralai/models/ocrtableobject.py +4 -1
- mistralai/models/realtimetranscriptionerror.py +27 -0
- mistralai/models/realtimetranscriptionerrordetail.py +29 -0
- mistralai/models/realtimetranscriptionsession.py +20 -0
- mistralai/models/realtimetranscriptionsessioncreated.py +30 -0
- mistralai/models/realtimetranscriptionsessionupdated.py +30 -0
- mistralai/models/referencechunk.py +1 -1
- mistralai/models/requestsource.py +5 -1
- mistralai/models/responsedoneevent.py +1 -1
- mistralai/models/responseerrorevent.py +1 -1
- mistralai/models/responseformats.py +5 -1
- mistralai/models/responsestartedevent.py +1 -1
- mistralai/models/responsevalidationerror.py +2 -0
- mistralai/models/retrievefileout.py +3 -5
- mistralai/models/sampletype.py +7 -1
- mistralai/models/sdkerror.py +2 -0
- mistralai/models/shareenum.py +7 -1
- mistralai/models/sharingdelete.py +2 -4
- mistralai/models/sharingin.py +3 -5
- mistralai/models/source.py +8 -1
- mistralai/models/systemmessage.py +1 -1
- mistralai/models/textchunk.py +1 -1
- mistralai/models/thinkchunk.py +1 -1
- mistralai/models/timestampgranularity.py +4 -1
- mistralai/models/tool.py +2 -6
- mistralai/models/toolcall.py +2 -6
- mistralai/models/toolchoice.py +2 -6
- mistralai/models/toolchoiceenum.py +6 -1
- mistralai/models/toolexecutiondeltaevent.py +2 -1
- mistralai/models/toolexecutiondoneevent.py +2 -1
- mistralai/models/toolexecutionentry.py +4 -2
- mistralai/models/toolexecutionstartedevent.py +2 -1
- mistralai/models/toolfilechunk.py +2 -1
- mistralai/models/toolmessage.py +1 -1
- mistralai/models/toolreferencechunk.py +2 -1
- mistralai/models/tooltypes.py +1 -1
- mistralai/models/transcriptionsegmentchunk.py +42 -3
- mistralai/models/transcriptionstreamdone.py +1 -1
- mistralai/models/transcriptionstreamlanguage.py +1 -1
- mistralai/models/transcriptionstreamsegmentdelta.py +39 -3
- mistralai/models/transcriptionstreamtextdelta.py +1 -1
- mistralai/models/unarchiveftmodelout.py +1 -1
- mistralai/models/uploadfileout.py +3 -5
- mistralai/models/usermessage.py +1 -1
- mistralai/models/wandbintegration.py +1 -1
- mistralai/models/wandbintegrationout.py +1 -1
- mistralai/models/websearchpremiumtool.py +1 -1
- mistralai/models/websearchtool.py +1 -1
- mistralai/models_.py +24 -12
- mistralai/ocr.py +38 -10
- mistralai/sdk.py +2 -2
- mistralai/transcriptions.py +52 -12
- mistralai/types/basemodel.py +41 -3
- mistralai/utils/__init__.py +0 -3
- mistralai/utils/annotations.py +32 -8
- mistralai/utils/enums.py +60 -0
- mistralai/utils/forms.py +21 -10
- mistralai/utils/queryparams.py +14 -2
- mistralai/utils/requestbodies.py +3 -3
- mistralai/utils/retries.py +69 -5
- mistralai/utils/serializers.py +0 -20
- mistralai/utils/unmarshal_json_response.py +15 -1
- {mistralai-1.10.1.dist-info → mistralai-1.12.0.dist-info}/METADATA +28 -31
- {mistralai-1.10.1.dist-info → mistralai-1.12.0.dist-info}/RECORD +251 -237
- mistralai_azure/_version.py +3 -3
- mistralai_azure/basesdk.py +6 -0
- mistralai_azure/chat.py +27 -15
- mistralai_azure/httpclient.py +0 -1
- mistralai_azure/models/__init__.py +16 -1
- mistralai_azure/models/assistantmessage.py +1 -1
- mistralai_azure/models/chatcompletionchoice.py +10 -7
- mistralai_azure/models/chatcompletionrequest.py +8 -6
- mistralai_azure/models/chatcompletionstreamrequest.py +8 -6
- mistralai_azure/models/completionresponsestreamchoice.py +11 -7
- mistralai_azure/models/documenturlchunk.py +1 -1
- mistralai_azure/models/httpvalidationerror.py +4 -2
- mistralai_azure/models/imageurlchunk.py +1 -1
- mistralai_azure/models/mistralazureerror.py +11 -7
- mistralai_azure/models/mistralpromptmode.py +1 -1
- mistralai_azure/models/no_response_error.py +5 -1
- mistralai_azure/models/ocrpageobject.py +32 -5
- mistralai_azure/models/ocrrequest.py +20 -1
- mistralai_azure/models/ocrtableobject.py +34 -0
- mistralai_azure/models/referencechunk.py +1 -1
- mistralai_azure/models/responseformats.py +5 -1
- mistralai_azure/models/responsevalidationerror.py +2 -0
- mistralai_azure/models/sdkerror.py +2 -0
- mistralai_azure/models/systemmessage.py +1 -1
- mistralai_azure/models/textchunk.py +1 -1
- mistralai_azure/models/thinkchunk.py +1 -1
- mistralai_azure/models/tool.py +2 -6
- mistralai_azure/models/toolcall.py +2 -6
- mistralai_azure/models/toolchoice.py +2 -6
- mistralai_azure/models/toolchoiceenum.py +6 -1
- mistralai_azure/models/toolmessage.py +1 -1
- mistralai_azure/models/tooltypes.py +1 -1
- mistralai_azure/models/usermessage.py +1 -1
- mistralai_azure/ocr.py +26 -6
- mistralai_azure/types/basemodel.py +41 -3
- mistralai_azure/utils/__init__.py +0 -3
- mistralai_azure/utils/annotations.py +32 -8
- mistralai_azure/utils/enums.py +60 -0
- mistralai_azure/utils/forms.py +21 -10
- mistralai_azure/utils/queryparams.py +14 -2
- mistralai_azure/utils/requestbodies.py +3 -3
- mistralai_azure/utils/retries.py +69 -5
- mistralai_azure/utils/serializers.py +0 -20
- mistralai_azure/utils/unmarshal_json_response.py +15 -1
- mistralai_gcp/_version.py +3 -3
- mistralai_gcp/basesdk.py +6 -0
- mistralai_gcp/chat.py +27 -15
- mistralai_gcp/fim.py +27 -15
- mistralai_gcp/httpclient.py +0 -1
- mistralai_gcp/models/assistantmessage.py +1 -1
- mistralai_gcp/models/chatcompletionchoice.py +10 -7
- mistralai_gcp/models/chatcompletionrequest.py +8 -6
- mistralai_gcp/models/chatcompletionstreamrequest.py +8 -6
- mistralai_gcp/models/completionresponsestreamchoice.py +11 -7
- mistralai_gcp/models/fimcompletionrequest.py +6 -1
- mistralai_gcp/models/fimcompletionstreamrequest.py +6 -1
- mistralai_gcp/models/httpvalidationerror.py +4 -2
- mistralai_gcp/models/imageurlchunk.py +1 -1
- mistralai_gcp/models/mistralgcperror.py +11 -7
- mistralai_gcp/models/mistralpromptmode.py +1 -1
- mistralai_gcp/models/no_response_error.py +5 -1
- mistralai_gcp/models/referencechunk.py +1 -1
- mistralai_gcp/models/responseformats.py +5 -1
- mistralai_gcp/models/responsevalidationerror.py +2 -0
- mistralai_gcp/models/sdkerror.py +2 -0
- mistralai_gcp/models/systemmessage.py +1 -1
- mistralai_gcp/models/textchunk.py +1 -1
- mistralai_gcp/models/thinkchunk.py +1 -1
- mistralai_gcp/models/tool.py +2 -6
- mistralai_gcp/models/toolcall.py +2 -6
- mistralai_gcp/models/toolchoice.py +2 -6
- mistralai_gcp/models/toolchoiceenum.py +6 -1
- mistralai_gcp/models/toolmessage.py +1 -1
- mistralai_gcp/models/tooltypes.py +1 -1
- mistralai_gcp/models/usermessage.py +1 -1
- mistralai_gcp/types/basemodel.py +41 -3
- mistralai_gcp/utils/__init__.py +0 -3
- mistralai_gcp/utils/annotations.py +32 -8
- mistralai_gcp/utils/enums.py +60 -0
- mistralai_gcp/utils/forms.py +21 -10
- mistralai_gcp/utils/queryparams.py +14 -2
- mistralai_gcp/utils/requestbodies.py +3 -3
- mistralai_gcp/utils/retries.py +69 -5
- mistralai_gcp/utils/serializers.py +0 -20
- mistralai_gcp/utils/unmarshal_json_response.py +15 -1
- {mistralai-1.10.1.dist-info → mistralai-1.12.0.dist-info}/WHEEL +0 -0
- {mistralai-1.10.1.dist-info → mistralai-1.12.0.dist-info}/licenses/LICENSE +0 -0
mistralai/mistral_jobs.py
CHANGED
|
@@ -4,6 +4,11 @@ from .basesdk import BaseSDK
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from mistralai import models, utils
|
|
6
6
|
from mistralai._hooks import HookContext
|
|
7
|
+
from mistralai.models import (
|
|
8
|
+
apiendpoint as models_apiendpoint,
|
|
9
|
+
batchjobstatus as models_batchjobstatus,
|
|
10
|
+
batchrequest as models_batchrequest,
|
|
11
|
+
)
|
|
7
12
|
from mistralai.types import OptionalNullable, UNSET
|
|
8
13
|
from mistralai.utils import get_security_from_env
|
|
9
14
|
from mistralai.utils.unmarshal_json_response import unmarshal_json_response
|
|
@@ -21,7 +26,7 @@ class MistralJobs(BaseSDK):
|
|
|
21
26
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET,
|
|
22
27
|
created_after: OptionalNullable[datetime] = UNSET,
|
|
23
28
|
created_by_me: Optional[bool] = False,
|
|
24
|
-
status: OptionalNullable[List[
|
|
29
|
+
status: OptionalNullable[List[models_batchjobstatus.BatchJobStatus]] = UNSET,
|
|
25
30
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
26
31
|
server_url: Optional[str] = None,
|
|
27
32
|
timeout_ms: Optional[int] = None,
|
|
@@ -78,6 +83,7 @@ class MistralJobs(BaseSDK):
|
|
|
78
83
|
accept_header_value="application/json",
|
|
79
84
|
http_headers=http_headers,
|
|
80
85
|
security=self.sdk_configuration.security,
|
|
86
|
+
allow_empty_value=None,
|
|
81
87
|
timeout_ms=timeout_ms,
|
|
82
88
|
)
|
|
83
89
|
|
|
@@ -94,7 +100,7 @@ class MistralJobs(BaseSDK):
|
|
|
94
100
|
config=self.sdk_configuration,
|
|
95
101
|
base_url=base_url or "",
|
|
96
102
|
operation_id="jobs_api_routes_batch_get_batch_jobs",
|
|
97
|
-
oauth2_scopes=
|
|
103
|
+
oauth2_scopes=None,
|
|
98
104
|
security_source=get_security_from_env(
|
|
99
105
|
self.sdk_configuration.security, models.Security
|
|
100
106
|
),
|
|
@@ -125,7 +131,7 @@ class MistralJobs(BaseSDK):
|
|
|
125
131
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET,
|
|
126
132
|
created_after: OptionalNullable[datetime] = UNSET,
|
|
127
133
|
created_by_me: Optional[bool] = False,
|
|
128
|
-
status: OptionalNullable[List[
|
|
134
|
+
status: OptionalNullable[List[models_batchjobstatus.BatchJobStatus]] = UNSET,
|
|
129
135
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
130
136
|
server_url: Optional[str] = None,
|
|
131
137
|
timeout_ms: Optional[int] = None,
|
|
@@ -182,6 +188,7 @@ class MistralJobs(BaseSDK):
|
|
|
182
188
|
accept_header_value="application/json",
|
|
183
189
|
http_headers=http_headers,
|
|
184
190
|
security=self.sdk_configuration.security,
|
|
191
|
+
allow_empty_value=None,
|
|
185
192
|
timeout_ms=timeout_ms,
|
|
186
193
|
)
|
|
187
194
|
|
|
@@ -198,7 +205,7 @@ class MistralJobs(BaseSDK):
|
|
|
198
205
|
config=self.sdk_configuration,
|
|
199
206
|
base_url=base_url or "",
|
|
200
207
|
operation_id="jobs_api_routes_batch_get_batch_jobs",
|
|
201
|
-
oauth2_scopes=
|
|
208
|
+
oauth2_scopes=None,
|
|
202
209
|
security_source=get_security_from_env(
|
|
203
210
|
self.sdk_configuration.security, models.Security
|
|
204
211
|
),
|
|
@@ -222,10 +229,13 @@ class MistralJobs(BaseSDK):
|
|
|
222
229
|
def create(
|
|
223
230
|
self,
|
|
224
231
|
*,
|
|
225
|
-
endpoint:
|
|
232
|
+
endpoint: models_apiendpoint.APIEndpoint,
|
|
226
233
|
input_files: OptionalNullable[List[str]] = UNSET,
|
|
227
234
|
requests: OptionalNullable[
|
|
228
|
-
Union[
|
|
235
|
+
Union[
|
|
236
|
+
List[models_batchrequest.BatchRequest],
|
|
237
|
+
List[models_batchrequest.BatchRequestTypedDict],
|
|
238
|
+
]
|
|
229
239
|
] = UNSET,
|
|
230
240
|
model: OptionalNullable[str] = UNSET,
|
|
231
241
|
agent_id: OptionalNullable[str] = UNSET,
|
|
@@ -290,6 +300,7 @@ class MistralJobs(BaseSDK):
|
|
|
290
300
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
291
301
|
request, False, False, "json", models.BatchJobIn
|
|
292
302
|
),
|
|
303
|
+
allow_empty_value=None,
|
|
293
304
|
timeout_ms=timeout_ms,
|
|
294
305
|
)
|
|
295
306
|
|
|
@@ -306,7 +317,7 @@ class MistralJobs(BaseSDK):
|
|
|
306
317
|
config=self.sdk_configuration,
|
|
307
318
|
base_url=base_url or "",
|
|
308
319
|
operation_id="jobs_api_routes_batch_create_batch_job",
|
|
309
|
-
oauth2_scopes=
|
|
320
|
+
oauth2_scopes=None,
|
|
310
321
|
security_source=get_security_from_env(
|
|
311
322
|
self.sdk_configuration.security, models.Security
|
|
312
323
|
),
|
|
@@ -330,10 +341,13 @@ class MistralJobs(BaseSDK):
|
|
|
330
341
|
async def create_async(
|
|
331
342
|
self,
|
|
332
343
|
*,
|
|
333
|
-
endpoint:
|
|
344
|
+
endpoint: models_apiendpoint.APIEndpoint,
|
|
334
345
|
input_files: OptionalNullable[List[str]] = UNSET,
|
|
335
346
|
requests: OptionalNullable[
|
|
336
|
-
Union[
|
|
347
|
+
Union[
|
|
348
|
+
List[models_batchrequest.BatchRequest],
|
|
349
|
+
List[models_batchrequest.BatchRequestTypedDict],
|
|
350
|
+
]
|
|
337
351
|
] = UNSET,
|
|
338
352
|
model: OptionalNullable[str] = UNSET,
|
|
339
353
|
agent_id: OptionalNullable[str] = UNSET,
|
|
@@ -398,6 +412,7 @@ class MistralJobs(BaseSDK):
|
|
|
398
412
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
399
413
|
request, False, False, "json", models.BatchJobIn
|
|
400
414
|
),
|
|
415
|
+
allow_empty_value=None,
|
|
401
416
|
timeout_ms=timeout_ms,
|
|
402
417
|
)
|
|
403
418
|
|
|
@@ -414,7 +429,7 @@ class MistralJobs(BaseSDK):
|
|
|
414
429
|
config=self.sdk_configuration,
|
|
415
430
|
base_url=base_url or "",
|
|
416
431
|
operation_id="jobs_api_routes_batch_create_batch_job",
|
|
417
|
-
oauth2_scopes=
|
|
432
|
+
oauth2_scopes=None,
|
|
418
433
|
security_source=get_security_from_env(
|
|
419
434
|
self.sdk_configuration.security, models.Security
|
|
420
435
|
),
|
|
@@ -487,6 +502,7 @@ class MistralJobs(BaseSDK):
|
|
|
487
502
|
accept_header_value="application/json",
|
|
488
503
|
http_headers=http_headers,
|
|
489
504
|
security=self.sdk_configuration.security,
|
|
505
|
+
allow_empty_value=None,
|
|
490
506
|
timeout_ms=timeout_ms,
|
|
491
507
|
)
|
|
492
508
|
|
|
@@ -503,7 +519,7 @@ class MistralJobs(BaseSDK):
|
|
|
503
519
|
config=self.sdk_configuration,
|
|
504
520
|
base_url=base_url or "",
|
|
505
521
|
operation_id="jobs_api_routes_batch_get_batch_job",
|
|
506
|
-
oauth2_scopes=
|
|
522
|
+
oauth2_scopes=None,
|
|
507
523
|
security_source=get_security_from_env(
|
|
508
524
|
self.sdk_configuration.security, models.Security
|
|
509
525
|
),
|
|
@@ -576,6 +592,7 @@ class MistralJobs(BaseSDK):
|
|
|
576
592
|
accept_header_value="application/json",
|
|
577
593
|
http_headers=http_headers,
|
|
578
594
|
security=self.sdk_configuration.security,
|
|
595
|
+
allow_empty_value=None,
|
|
579
596
|
timeout_ms=timeout_ms,
|
|
580
597
|
)
|
|
581
598
|
|
|
@@ -592,7 +609,7 @@ class MistralJobs(BaseSDK):
|
|
|
592
609
|
config=self.sdk_configuration,
|
|
593
610
|
base_url=base_url or "",
|
|
594
611
|
operation_id="jobs_api_routes_batch_get_batch_job",
|
|
595
|
-
oauth2_scopes=
|
|
612
|
+
oauth2_scopes=None,
|
|
596
613
|
security_source=get_security_from_env(
|
|
597
614
|
self.sdk_configuration.security, models.Security
|
|
598
615
|
),
|
|
@@ -659,6 +676,7 @@ class MistralJobs(BaseSDK):
|
|
|
659
676
|
accept_header_value="application/json",
|
|
660
677
|
http_headers=http_headers,
|
|
661
678
|
security=self.sdk_configuration.security,
|
|
679
|
+
allow_empty_value=None,
|
|
662
680
|
timeout_ms=timeout_ms,
|
|
663
681
|
)
|
|
664
682
|
|
|
@@ -675,7 +693,7 @@ class MistralJobs(BaseSDK):
|
|
|
675
693
|
config=self.sdk_configuration,
|
|
676
694
|
base_url=base_url or "",
|
|
677
695
|
operation_id="jobs_api_routes_batch_cancel_batch_job",
|
|
678
|
-
oauth2_scopes=
|
|
696
|
+
oauth2_scopes=None,
|
|
679
697
|
security_source=get_security_from_env(
|
|
680
698
|
self.sdk_configuration.security, models.Security
|
|
681
699
|
),
|
|
@@ -742,6 +760,7 @@ class MistralJobs(BaseSDK):
|
|
|
742
760
|
accept_header_value="application/json",
|
|
743
761
|
http_headers=http_headers,
|
|
744
762
|
security=self.sdk_configuration.security,
|
|
763
|
+
allow_empty_value=None,
|
|
745
764
|
timeout_ms=timeout_ms,
|
|
746
765
|
)
|
|
747
766
|
|
|
@@ -758,7 +777,7 @@ class MistralJobs(BaseSDK):
|
|
|
758
777
|
config=self.sdk_configuration,
|
|
759
778
|
base_url=base_url or "",
|
|
760
779
|
operation_id="jobs_api_routes_batch_cancel_batch_job",
|
|
761
|
-
oauth2_scopes=
|
|
780
|
+
oauth2_scopes=None,
|
|
762
781
|
security_source=get_security_from_env(
|
|
763
782
|
self.sdk_configuration.security, models.Security
|
|
764
783
|
),
|
mistralai/models/__init__.py
CHANGED
|
@@ -14,8 +14,11 @@ if TYPE_CHECKING:
|
|
|
14
14
|
AgentToolsTypedDict,
|
|
15
15
|
AgentTypedDict,
|
|
16
16
|
)
|
|
17
|
+
from .agentaliasresponse import AgentAliasResponse, AgentAliasResponseTypedDict
|
|
17
18
|
from .agentconversation import (
|
|
18
19
|
AgentConversation,
|
|
20
|
+
AgentConversationAgentVersion,
|
|
21
|
+
AgentConversationAgentVersionTypedDict,
|
|
19
22
|
AgentConversationObject,
|
|
20
23
|
AgentConversationTypedDict,
|
|
21
24
|
)
|
|
@@ -41,13 +44,31 @@ if TYPE_CHECKING:
|
|
|
41
44
|
AgentHandoffStartedEventType,
|
|
42
45
|
AgentHandoffStartedEventTypedDict,
|
|
43
46
|
)
|
|
47
|
+
from .agents_api_v1_agents_create_or_update_aliasop import (
|
|
48
|
+
AgentsAPIV1AgentsCreateOrUpdateAliasRequest,
|
|
49
|
+
AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict,
|
|
50
|
+
)
|
|
44
51
|
from .agents_api_v1_agents_deleteop import (
|
|
45
52
|
AgentsAPIV1AgentsDeleteRequest,
|
|
46
53
|
AgentsAPIV1AgentsDeleteRequestTypedDict,
|
|
47
54
|
)
|
|
55
|
+
from .agents_api_v1_agents_get_versionop import (
|
|
56
|
+
AgentsAPIV1AgentsGetVersionRequest,
|
|
57
|
+
AgentsAPIV1AgentsGetVersionRequestTypedDict,
|
|
58
|
+
)
|
|
48
59
|
from .agents_api_v1_agents_getop import (
|
|
49
60
|
AgentsAPIV1AgentsGetRequest,
|
|
50
61
|
AgentsAPIV1AgentsGetRequestTypedDict,
|
|
62
|
+
QueryParamAgentVersion,
|
|
63
|
+
QueryParamAgentVersionTypedDict,
|
|
64
|
+
)
|
|
65
|
+
from .agents_api_v1_agents_list_version_aliasesop import (
|
|
66
|
+
AgentsAPIV1AgentsListVersionAliasesRequest,
|
|
67
|
+
AgentsAPIV1AgentsListVersionAliasesRequestTypedDict,
|
|
68
|
+
)
|
|
69
|
+
from .agents_api_v1_agents_list_versionsop import (
|
|
70
|
+
AgentsAPIV1AgentsListVersionsRequest,
|
|
71
|
+
AgentsAPIV1AgentsListVersionsRequestTypedDict,
|
|
51
72
|
)
|
|
52
73
|
from .agents_api_v1_agents_listop import (
|
|
53
74
|
AgentsAPIV1AgentsListRequest,
|
|
@@ -332,6 +353,8 @@ if TYPE_CHECKING:
|
|
|
332
353
|
ConversationMessagesTypedDict,
|
|
333
354
|
)
|
|
334
355
|
from .conversationrequest import (
|
|
356
|
+
AgentVersion,
|
|
357
|
+
AgentVersionTypedDict,
|
|
335
358
|
ConversationRequest,
|
|
336
359
|
ConversationRequestTypedDict,
|
|
337
360
|
HandoffExecution,
|
|
@@ -347,16 +370,22 @@ if TYPE_CHECKING:
|
|
|
347
370
|
)
|
|
348
371
|
from .conversationrestartrequest import (
|
|
349
372
|
ConversationRestartRequest,
|
|
373
|
+
ConversationRestartRequestAgentVersion,
|
|
374
|
+
ConversationRestartRequestAgentVersionTypedDict,
|
|
350
375
|
ConversationRestartRequestHandoffExecution,
|
|
351
376
|
ConversationRestartRequestTypedDict,
|
|
352
377
|
)
|
|
353
378
|
from .conversationrestartstreamrequest import (
|
|
354
379
|
ConversationRestartStreamRequest,
|
|
380
|
+
ConversationRestartStreamRequestAgentVersion,
|
|
381
|
+
ConversationRestartStreamRequestAgentVersionTypedDict,
|
|
355
382
|
ConversationRestartStreamRequestHandoffExecution,
|
|
356
383
|
ConversationRestartStreamRequestTypedDict,
|
|
357
384
|
)
|
|
358
385
|
from .conversationstreamrequest import (
|
|
359
386
|
ConversationStreamRequest,
|
|
387
|
+
ConversationStreamRequestAgentVersion,
|
|
388
|
+
ConversationStreamRequestAgentVersionTypedDict,
|
|
360
389
|
ConversationStreamRequestHandoffExecution,
|
|
361
390
|
ConversationStreamRequestTools,
|
|
362
391
|
ConversationStreamRequestToolsTypedDict,
|
|
@@ -750,6 +779,28 @@ if TYPE_CHECKING:
|
|
|
750
779
|
from .paginationinfo import PaginationInfo, PaginationInfoTypedDict
|
|
751
780
|
from .prediction import Prediction, PredictionTypedDict
|
|
752
781
|
from .processingstatusout import ProcessingStatusOut, ProcessingStatusOutTypedDict
|
|
782
|
+
from .realtimetranscriptionerror import (
|
|
783
|
+
RealtimeTranscriptionError,
|
|
784
|
+
RealtimeTranscriptionErrorTypedDict,
|
|
785
|
+
)
|
|
786
|
+
from .realtimetranscriptionerrordetail import (
|
|
787
|
+
Message,
|
|
788
|
+
MessageTypedDict,
|
|
789
|
+
RealtimeTranscriptionErrorDetail,
|
|
790
|
+
RealtimeTranscriptionErrorDetailTypedDict,
|
|
791
|
+
)
|
|
792
|
+
from .realtimetranscriptionsession import (
|
|
793
|
+
RealtimeTranscriptionSession,
|
|
794
|
+
RealtimeTranscriptionSessionTypedDict,
|
|
795
|
+
)
|
|
796
|
+
from .realtimetranscriptionsessioncreated import (
|
|
797
|
+
RealtimeTranscriptionSessionCreated,
|
|
798
|
+
RealtimeTranscriptionSessionCreatedTypedDict,
|
|
799
|
+
)
|
|
800
|
+
from .realtimetranscriptionsessionupdated import (
|
|
801
|
+
RealtimeTranscriptionSessionUpdated,
|
|
802
|
+
RealtimeTranscriptionSessionUpdatedTypedDict,
|
|
803
|
+
)
|
|
753
804
|
from .referencechunk import (
|
|
754
805
|
ReferenceChunk,
|
|
755
806
|
ReferenceChunkType,
|
|
@@ -943,7 +994,11 @@ if TYPE_CHECKING:
|
|
|
943
994
|
__all__ = [
|
|
944
995
|
"APIEndpoint",
|
|
945
996
|
"Agent",
|
|
997
|
+
"AgentAliasResponse",
|
|
998
|
+
"AgentAliasResponseTypedDict",
|
|
946
999
|
"AgentConversation",
|
|
1000
|
+
"AgentConversationAgentVersion",
|
|
1001
|
+
"AgentConversationAgentVersionTypedDict",
|
|
947
1002
|
"AgentConversationObject",
|
|
948
1003
|
"AgentConversationTypedDict",
|
|
949
1004
|
"AgentCreationRequest",
|
|
@@ -968,12 +1023,22 @@ __all__ = [
|
|
|
968
1023
|
"AgentUpdateRequestTools",
|
|
969
1024
|
"AgentUpdateRequestToolsTypedDict",
|
|
970
1025
|
"AgentUpdateRequestTypedDict",
|
|
1026
|
+
"AgentVersion",
|
|
1027
|
+
"AgentVersionTypedDict",
|
|
1028
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequest",
|
|
1029
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict",
|
|
971
1030
|
"AgentsAPIV1AgentsDeleteRequest",
|
|
972
1031
|
"AgentsAPIV1AgentsDeleteRequestTypedDict",
|
|
973
1032
|
"AgentsAPIV1AgentsGetRequest",
|
|
974
1033
|
"AgentsAPIV1AgentsGetRequestTypedDict",
|
|
1034
|
+
"AgentsAPIV1AgentsGetVersionRequest",
|
|
1035
|
+
"AgentsAPIV1AgentsGetVersionRequestTypedDict",
|
|
975
1036
|
"AgentsAPIV1AgentsListRequest",
|
|
976
1037
|
"AgentsAPIV1AgentsListRequestTypedDict",
|
|
1038
|
+
"AgentsAPIV1AgentsListVersionAliasesRequest",
|
|
1039
|
+
"AgentsAPIV1AgentsListVersionAliasesRequestTypedDict",
|
|
1040
|
+
"AgentsAPIV1AgentsListVersionsRequest",
|
|
1041
|
+
"AgentsAPIV1AgentsListVersionsRequestTypedDict",
|
|
977
1042
|
"AgentsAPIV1AgentsUpdateRequest",
|
|
978
1043
|
"AgentsAPIV1AgentsUpdateRequestTypedDict",
|
|
979
1044
|
"AgentsAPIV1AgentsUpdateVersionRequest",
|
|
@@ -1172,12 +1237,18 @@ __all__ = [
|
|
|
1172
1237
|
"ConversationResponseObject",
|
|
1173
1238
|
"ConversationResponseTypedDict",
|
|
1174
1239
|
"ConversationRestartRequest",
|
|
1240
|
+
"ConversationRestartRequestAgentVersion",
|
|
1241
|
+
"ConversationRestartRequestAgentVersionTypedDict",
|
|
1175
1242
|
"ConversationRestartRequestHandoffExecution",
|
|
1176
1243
|
"ConversationRestartRequestTypedDict",
|
|
1177
1244
|
"ConversationRestartStreamRequest",
|
|
1245
|
+
"ConversationRestartStreamRequestAgentVersion",
|
|
1246
|
+
"ConversationRestartStreamRequestAgentVersionTypedDict",
|
|
1178
1247
|
"ConversationRestartStreamRequestHandoffExecution",
|
|
1179
1248
|
"ConversationRestartStreamRequestTypedDict",
|
|
1180
1249
|
"ConversationStreamRequest",
|
|
1250
|
+
"ConversationStreamRequestAgentVersion",
|
|
1251
|
+
"ConversationStreamRequestAgentVersionTypedDict",
|
|
1181
1252
|
"ConversationStreamRequestHandoffExecution",
|
|
1182
1253
|
"ConversationStreamRequestTools",
|
|
1183
1254
|
"ConversationStreamRequestToolsTypedDict",
|
|
@@ -1419,6 +1490,7 @@ __all__ = [
|
|
|
1419
1490
|
"ListSharingOutTypedDict",
|
|
1420
1491
|
"Loc",
|
|
1421
1492
|
"LocTypedDict",
|
|
1493
|
+
"Message",
|
|
1422
1494
|
"MessageEntries",
|
|
1423
1495
|
"MessageEntriesTypedDict",
|
|
1424
1496
|
"MessageInputContentChunks",
|
|
@@ -1444,6 +1516,7 @@ __all__ = [
|
|
|
1444
1516
|
"MessageOutputEventRole",
|
|
1445
1517
|
"MessageOutputEventType",
|
|
1446
1518
|
"MessageOutputEventTypedDict",
|
|
1519
|
+
"MessageTypedDict",
|
|
1447
1520
|
"Messages",
|
|
1448
1521
|
"MessagesTypedDict",
|
|
1449
1522
|
"MetricOut",
|
|
@@ -1494,7 +1567,19 @@ __all__ = [
|
|
|
1494
1567
|
"PredictionTypedDict",
|
|
1495
1568
|
"ProcessingStatusOut",
|
|
1496
1569
|
"ProcessingStatusOutTypedDict",
|
|
1570
|
+
"QueryParamAgentVersion",
|
|
1571
|
+
"QueryParamAgentVersionTypedDict",
|
|
1497
1572
|
"QueryParamStatus",
|
|
1573
|
+
"RealtimeTranscriptionError",
|
|
1574
|
+
"RealtimeTranscriptionErrorDetail",
|
|
1575
|
+
"RealtimeTranscriptionErrorDetailTypedDict",
|
|
1576
|
+
"RealtimeTranscriptionErrorTypedDict",
|
|
1577
|
+
"RealtimeTranscriptionSession",
|
|
1578
|
+
"RealtimeTranscriptionSessionCreated",
|
|
1579
|
+
"RealtimeTranscriptionSessionCreatedTypedDict",
|
|
1580
|
+
"RealtimeTranscriptionSessionTypedDict",
|
|
1581
|
+
"RealtimeTranscriptionSessionUpdated",
|
|
1582
|
+
"RealtimeTranscriptionSessionUpdatedTypedDict",
|
|
1498
1583
|
"ReferenceChunk",
|
|
1499
1584
|
"ReferenceChunkType",
|
|
1500
1585
|
"ReferenceChunkTypedDict",
|
|
@@ -1663,7 +1748,11 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1663
1748
|
"AgentTools": ".agent",
|
|
1664
1749
|
"AgentToolsTypedDict": ".agent",
|
|
1665
1750
|
"AgentTypedDict": ".agent",
|
|
1751
|
+
"AgentAliasResponse": ".agentaliasresponse",
|
|
1752
|
+
"AgentAliasResponseTypedDict": ".agentaliasresponse",
|
|
1666
1753
|
"AgentConversation": ".agentconversation",
|
|
1754
|
+
"AgentConversationAgentVersion": ".agentconversation",
|
|
1755
|
+
"AgentConversationAgentVersionTypedDict": ".agentconversation",
|
|
1667
1756
|
"AgentConversationObject": ".agentconversation",
|
|
1668
1757
|
"AgentConversationTypedDict": ".agentconversation",
|
|
1669
1758
|
"AgentCreationRequest": ".agentcreationrequest",
|
|
@@ -1680,10 +1769,20 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1680
1769
|
"AgentHandoffStartedEvent": ".agenthandoffstartedevent",
|
|
1681
1770
|
"AgentHandoffStartedEventType": ".agenthandoffstartedevent",
|
|
1682
1771
|
"AgentHandoffStartedEventTypedDict": ".agenthandoffstartedevent",
|
|
1772
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequest": ".agents_api_v1_agents_create_or_update_aliasop",
|
|
1773
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict": ".agents_api_v1_agents_create_or_update_aliasop",
|
|
1683
1774
|
"AgentsAPIV1AgentsDeleteRequest": ".agents_api_v1_agents_deleteop",
|
|
1684
1775
|
"AgentsAPIV1AgentsDeleteRequestTypedDict": ".agents_api_v1_agents_deleteop",
|
|
1776
|
+
"AgentsAPIV1AgentsGetVersionRequest": ".agents_api_v1_agents_get_versionop",
|
|
1777
|
+
"AgentsAPIV1AgentsGetVersionRequestTypedDict": ".agents_api_v1_agents_get_versionop",
|
|
1685
1778
|
"AgentsAPIV1AgentsGetRequest": ".agents_api_v1_agents_getop",
|
|
1686
1779
|
"AgentsAPIV1AgentsGetRequestTypedDict": ".agents_api_v1_agents_getop",
|
|
1780
|
+
"QueryParamAgentVersion": ".agents_api_v1_agents_getop",
|
|
1781
|
+
"QueryParamAgentVersionTypedDict": ".agents_api_v1_agents_getop",
|
|
1782
|
+
"AgentsAPIV1AgentsListVersionAliasesRequest": ".agents_api_v1_agents_list_version_aliasesop",
|
|
1783
|
+
"AgentsAPIV1AgentsListVersionAliasesRequestTypedDict": ".agents_api_v1_agents_list_version_aliasesop",
|
|
1784
|
+
"AgentsAPIV1AgentsListVersionsRequest": ".agents_api_v1_agents_list_versionsop",
|
|
1785
|
+
"AgentsAPIV1AgentsListVersionsRequestTypedDict": ".agents_api_v1_agents_list_versionsop",
|
|
1687
1786
|
"AgentsAPIV1AgentsListRequest": ".agents_api_v1_agents_listop",
|
|
1688
1787
|
"AgentsAPIV1AgentsListRequestTypedDict": ".agents_api_v1_agents_listop",
|
|
1689
1788
|
"AgentsAPIV1AgentsUpdateVersionRequest": ".agents_api_v1_agents_update_versionop",
|
|
@@ -1897,6 +1996,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1897
1996
|
"ConversationMessages": ".conversationmessages",
|
|
1898
1997
|
"ConversationMessagesObject": ".conversationmessages",
|
|
1899
1998
|
"ConversationMessagesTypedDict": ".conversationmessages",
|
|
1999
|
+
"AgentVersion": ".conversationrequest",
|
|
2000
|
+
"AgentVersionTypedDict": ".conversationrequest",
|
|
1900
2001
|
"ConversationRequest": ".conversationrequest",
|
|
1901
2002
|
"ConversationRequestTypedDict": ".conversationrequest",
|
|
1902
2003
|
"HandoffExecution": ".conversationrequest",
|
|
@@ -1908,12 +2009,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1908
2009
|
"Outputs": ".conversationresponse",
|
|
1909
2010
|
"OutputsTypedDict": ".conversationresponse",
|
|
1910
2011
|
"ConversationRestartRequest": ".conversationrestartrequest",
|
|
2012
|
+
"ConversationRestartRequestAgentVersion": ".conversationrestartrequest",
|
|
2013
|
+
"ConversationRestartRequestAgentVersionTypedDict": ".conversationrestartrequest",
|
|
1911
2014
|
"ConversationRestartRequestHandoffExecution": ".conversationrestartrequest",
|
|
1912
2015
|
"ConversationRestartRequestTypedDict": ".conversationrestartrequest",
|
|
1913
2016
|
"ConversationRestartStreamRequest": ".conversationrestartstreamrequest",
|
|
2017
|
+
"ConversationRestartStreamRequestAgentVersion": ".conversationrestartstreamrequest",
|
|
2018
|
+
"ConversationRestartStreamRequestAgentVersionTypedDict": ".conversationrestartstreamrequest",
|
|
1914
2019
|
"ConversationRestartStreamRequestHandoffExecution": ".conversationrestartstreamrequest",
|
|
1915
2020
|
"ConversationRestartStreamRequestTypedDict": ".conversationrestartstreamrequest",
|
|
1916
2021
|
"ConversationStreamRequest": ".conversationstreamrequest",
|
|
2022
|
+
"ConversationStreamRequestAgentVersion": ".conversationstreamrequest",
|
|
2023
|
+
"ConversationStreamRequestAgentVersionTypedDict": ".conversationstreamrequest",
|
|
1917
2024
|
"ConversationStreamRequestHandoffExecution": ".conversationstreamrequest",
|
|
1918
2025
|
"ConversationStreamRequestTools": ".conversationstreamrequest",
|
|
1919
2026
|
"ConversationStreamRequestToolsTypedDict": ".conversationstreamrequest",
|
|
@@ -2221,6 +2328,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2221
2328
|
"PredictionTypedDict": ".prediction",
|
|
2222
2329
|
"ProcessingStatusOut": ".processingstatusout",
|
|
2223
2330
|
"ProcessingStatusOutTypedDict": ".processingstatusout",
|
|
2331
|
+
"RealtimeTranscriptionError": ".realtimetranscriptionerror",
|
|
2332
|
+
"RealtimeTranscriptionErrorTypedDict": ".realtimetranscriptionerror",
|
|
2333
|
+
"Message": ".realtimetranscriptionerrordetail",
|
|
2334
|
+
"MessageTypedDict": ".realtimetranscriptionerrordetail",
|
|
2335
|
+
"RealtimeTranscriptionErrorDetail": ".realtimetranscriptionerrordetail",
|
|
2336
|
+
"RealtimeTranscriptionErrorDetailTypedDict": ".realtimetranscriptionerrordetail",
|
|
2337
|
+
"RealtimeTranscriptionSession": ".realtimetranscriptionsession",
|
|
2338
|
+
"RealtimeTranscriptionSessionTypedDict": ".realtimetranscriptionsession",
|
|
2339
|
+
"RealtimeTranscriptionSessionCreated": ".realtimetranscriptionsessioncreated",
|
|
2340
|
+
"RealtimeTranscriptionSessionCreatedTypedDict": ".realtimetranscriptionsessioncreated",
|
|
2341
|
+
"RealtimeTranscriptionSessionUpdated": ".realtimetranscriptionsessionupdated",
|
|
2342
|
+
"RealtimeTranscriptionSessionUpdatedTypedDict": ".realtimetranscriptionsessionupdated",
|
|
2224
2343
|
"ReferenceChunk": ".referencechunk",
|
|
2225
2344
|
"ReferenceChunkType": ".referencechunk",
|
|
2226
2345
|
"ReferenceChunkTypedDict": ".referencechunk",
|
mistralai/models/agent.py
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from mistralai.types import BaseModel
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentAliasResponseTypedDict(TypedDict):
|
|
10
|
+
alias: str
|
|
11
|
+
version: int
|
|
12
|
+
created_at: datetime
|
|
13
|
+
updated_at: datetime
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AgentAliasResponse(BaseModel):
|
|
17
|
+
alias: str
|
|
18
|
+
|
|
19
|
+
version: int
|
|
20
|
+
|
|
21
|
+
created_at: datetime
|
|
22
|
+
|
|
23
|
+
updated_at: datetime
|
|
@@ -4,11 +4,21 @@ from __future__ import annotations
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
6
|
from pydantic import model_serializer
|
|
7
|
-
from typing import Any, Dict, Literal, Optional
|
|
8
|
-
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
from typing import Any, Dict, Literal, Optional, Union
|
|
8
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
AgentConversationObject = Literal["conversation"]
|
|
11
|
+
AgentConversationObject = Literal["conversation",]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
AgentConversationAgentVersionTypedDict = TypeAliasType(
|
|
15
|
+
"AgentConversationAgentVersionTypedDict", Union[str, int]
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
AgentConversationAgentVersion = TypeAliasType(
|
|
20
|
+
"AgentConversationAgentVersion", Union[str, int]
|
|
21
|
+
)
|
|
12
22
|
|
|
13
23
|
|
|
14
24
|
class AgentConversationTypedDict(TypedDict):
|
|
@@ -23,7 +33,7 @@ class AgentConversationTypedDict(TypedDict):
|
|
|
23
33
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
24
34
|
r"""Custom metadata for the conversation."""
|
|
25
35
|
object: NotRequired[AgentConversationObject]
|
|
26
|
-
agent_version: NotRequired[Nullable[
|
|
36
|
+
agent_version: NotRequired[Nullable[AgentConversationAgentVersionTypedDict]]
|
|
27
37
|
|
|
28
38
|
|
|
29
39
|
class AgentConversation(BaseModel):
|
|
@@ -46,7 +56,7 @@ class AgentConversation(BaseModel):
|
|
|
46
56
|
|
|
47
57
|
object: Optional[AgentConversationObject] = "conversation"
|
|
48
58
|
|
|
49
|
-
agent_version: OptionalNullable[
|
|
59
|
+
agent_version: OptionalNullable[AgentConversationAgentVersion] = UNSET
|
|
50
60
|
|
|
51
61
|
@model_serializer(mode="wrap")
|
|
52
62
|
def serialize_model(self, handler):
|
|
@@ -7,7 +7,7 @@ from typing import Literal, Optional
|
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
AgentHandoffDoneEventType = Literal["agent.handoff.done"]
|
|
10
|
+
AgentHandoffDoneEventType = Literal["agent.handoff.done",]
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class AgentHandoffDoneEventTypedDict(TypedDict):
|
|
@@ -8,9 +8,10 @@ from typing import Literal, Optional
|
|
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
AgentHandoffEntryObject = Literal["entry"]
|
|
11
|
+
AgentHandoffEntryObject = Literal["entry",]
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
AgentHandoffEntryType = Literal["agent.handoff",]
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class AgentHandoffEntryTypedDict(TypedDict):
|
|
@@ -7,7 +7,7 @@ from typing import Literal, Optional
|
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
AgentHandoffStartedEventType = Literal["agent.handoff.started"]
|
|
10
|
+
AgentHandoffStartedEventType = Literal["agent.handoff.started",]
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class AgentHandoffStartedEventTypedDict(TypedDict):
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import BaseModel
|
|
5
|
+
from mistralai.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict(TypedDict):
|
|
10
|
+
agent_id: str
|
|
11
|
+
alias: str
|
|
12
|
+
version: int
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AgentsAPIV1AgentsCreateOrUpdateAliasRequest(BaseModel):
|
|
16
|
+
agent_id: Annotated[
|
|
17
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
alias: Annotated[
|
|
21
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
version: Annotated[
|
|
25
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
26
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import BaseModel
|
|
5
|
+
from mistralai.utils import FieldMetadata, PathParamMetadata
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentsAPIV1AgentsGetVersionRequestTypedDict(TypedDict):
|
|
10
|
+
agent_id: str
|
|
11
|
+
version: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AgentsAPIV1AgentsGetVersionRequest(BaseModel):
|
|
15
|
+
agent_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
version: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -4,12 +4,21 @@ from __future__ import annotations
|
|
|
4
4
|
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
5
|
from mistralai.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
|
|
6
6
|
from pydantic import model_serializer
|
|
7
|
-
from
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
QueryParamAgentVersionTypedDict = TypeAliasType(
|
|
12
|
+
"QueryParamAgentVersionTypedDict", Union[int, str]
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
QueryParamAgentVersion = TypeAliasType("QueryParamAgentVersion", Union[int, str])
|
|
8
17
|
|
|
9
18
|
|
|
10
19
|
class AgentsAPIV1AgentsGetRequestTypedDict(TypedDict):
|
|
11
20
|
agent_id: str
|
|
12
|
-
agent_version: NotRequired[Nullable[
|
|
21
|
+
agent_version: NotRequired[Nullable[QueryParamAgentVersionTypedDict]]
|
|
13
22
|
|
|
14
23
|
|
|
15
24
|
class AgentsAPIV1AgentsGetRequest(BaseModel):
|
|
@@ -18,7 +27,7 @@ class AgentsAPIV1AgentsGetRequest(BaseModel):
|
|
|
18
27
|
]
|
|
19
28
|
|
|
20
29
|
agent_version: Annotated[
|
|
21
|
-
OptionalNullable[
|
|
30
|
+
OptionalNullable[QueryParamAgentVersion],
|
|
22
31
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
23
32
|
] = UNSET
|
|
24
33
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import BaseModel
|
|
5
|
+
from mistralai.utils import FieldMetadata, PathParamMetadata
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentsAPIV1AgentsListVersionAliasesRequestTypedDict(TypedDict):
|
|
10
|
+
agent_id: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AgentsAPIV1AgentsListVersionAliasesRequest(BaseModel):
|
|
14
|
+
agent_id: Annotated[
|
|
15
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
16
|
+
]
|