mistralai 1.11.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 +2 -2
- mistralai/audio.py +20 -0
- mistralai/conversations.py +48 -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 +6 -0
- mistralai/mistral_agents.py +391 -8
- mistralai/models/__init__.py +103 -0
- mistralai/models/agentaliasresponse.py +23 -0
- mistralai/models/agentconversation.py +14 -4
- mistralai/models/agents_api_v1_agents_create_or_update_aliasop.py +26 -0
- mistralai/models/agents_api_v1_agents_get_versionop.py +2 -2
- mistralai/models/agents_api_v1_agents_getop.py +12 -3
- mistralai/models/agents_api_v1_agents_list_version_aliasesop.py +16 -0
- mistralai/models/audiotranscriptionrequest.py +8 -0
- mistralai/models/audiotranscriptionrequeststream.py +8 -0
- mistralai/models/conversationrequest.py +8 -2
- mistralai/models/conversationrestartrequest.py +18 -4
- mistralai/models/conversationrestartstreamrequest.py +20 -4
- mistralai/models/conversationstreamrequest.py +12 -2
- mistralai/models/files_api_routes_list_filesop.py +8 -1
- mistralai/models/mistralpromptmode.py +4 -0
- mistralai/models/modelcapabilities.py +3 -0
- 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/timestampgranularity.py +4 -1
- mistralai/models/transcriptionsegmentchunk.py +41 -2
- mistralai/models/transcriptionstreamsegmentdelta.py +38 -2
- mistralai/transcriptions.py +24 -0
- {mistralai-1.11.1.dist-info → mistralai-1.12.0.dist-info}/METADATA +6 -2
- {mistralai-1.11.1.dist-info → mistralai-1.12.0.dist-info}/RECORD +39 -28
- {mistralai-1.11.1.dist-info → mistralai-1.12.0.dist-info}/WHEEL +0 -0
- {mistralai-1.11.1.dist-info → mistralai-1.12.0.dist-info}/licenses/LICENSE +0 -0
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,6 +44,10 @@ 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,
|
|
@@ -52,6 +59,12 @@ if TYPE_CHECKING:
|
|
|
52
59
|
from .agents_api_v1_agents_getop import (
|
|
53
60
|
AgentsAPIV1AgentsGetRequest,
|
|
54
61
|
AgentsAPIV1AgentsGetRequestTypedDict,
|
|
62
|
+
QueryParamAgentVersion,
|
|
63
|
+
QueryParamAgentVersionTypedDict,
|
|
64
|
+
)
|
|
65
|
+
from .agents_api_v1_agents_list_version_aliasesop import (
|
|
66
|
+
AgentsAPIV1AgentsListVersionAliasesRequest,
|
|
67
|
+
AgentsAPIV1AgentsListVersionAliasesRequestTypedDict,
|
|
55
68
|
)
|
|
56
69
|
from .agents_api_v1_agents_list_versionsop import (
|
|
57
70
|
AgentsAPIV1AgentsListVersionsRequest,
|
|
@@ -340,6 +353,8 @@ if TYPE_CHECKING:
|
|
|
340
353
|
ConversationMessagesTypedDict,
|
|
341
354
|
)
|
|
342
355
|
from .conversationrequest import (
|
|
356
|
+
AgentVersion,
|
|
357
|
+
AgentVersionTypedDict,
|
|
343
358
|
ConversationRequest,
|
|
344
359
|
ConversationRequestTypedDict,
|
|
345
360
|
HandoffExecution,
|
|
@@ -355,16 +370,22 @@ if TYPE_CHECKING:
|
|
|
355
370
|
)
|
|
356
371
|
from .conversationrestartrequest import (
|
|
357
372
|
ConversationRestartRequest,
|
|
373
|
+
ConversationRestartRequestAgentVersion,
|
|
374
|
+
ConversationRestartRequestAgentVersionTypedDict,
|
|
358
375
|
ConversationRestartRequestHandoffExecution,
|
|
359
376
|
ConversationRestartRequestTypedDict,
|
|
360
377
|
)
|
|
361
378
|
from .conversationrestartstreamrequest import (
|
|
362
379
|
ConversationRestartStreamRequest,
|
|
380
|
+
ConversationRestartStreamRequestAgentVersion,
|
|
381
|
+
ConversationRestartStreamRequestAgentVersionTypedDict,
|
|
363
382
|
ConversationRestartStreamRequestHandoffExecution,
|
|
364
383
|
ConversationRestartStreamRequestTypedDict,
|
|
365
384
|
)
|
|
366
385
|
from .conversationstreamrequest import (
|
|
367
386
|
ConversationStreamRequest,
|
|
387
|
+
ConversationStreamRequestAgentVersion,
|
|
388
|
+
ConversationStreamRequestAgentVersionTypedDict,
|
|
368
389
|
ConversationStreamRequestHandoffExecution,
|
|
369
390
|
ConversationStreamRequestTools,
|
|
370
391
|
ConversationStreamRequestToolsTypedDict,
|
|
@@ -758,6 +779,28 @@ if TYPE_CHECKING:
|
|
|
758
779
|
from .paginationinfo import PaginationInfo, PaginationInfoTypedDict
|
|
759
780
|
from .prediction import Prediction, PredictionTypedDict
|
|
760
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
|
+
)
|
|
761
804
|
from .referencechunk import (
|
|
762
805
|
ReferenceChunk,
|
|
763
806
|
ReferenceChunkType,
|
|
@@ -951,7 +994,11 @@ if TYPE_CHECKING:
|
|
|
951
994
|
__all__ = [
|
|
952
995
|
"APIEndpoint",
|
|
953
996
|
"Agent",
|
|
997
|
+
"AgentAliasResponse",
|
|
998
|
+
"AgentAliasResponseTypedDict",
|
|
954
999
|
"AgentConversation",
|
|
1000
|
+
"AgentConversationAgentVersion",
|
|
1001
|
+
"AgentConversationAgentVersionTypedDict",
|
|
955
1002
|
"AgentConversationObject",
|
|
956
1003
|
"AgentConversationTypedDict",
|
|
957
1004
|
"AgentCreationRequest",
|
|
@@ -976,6 +1023,10 @@ __all__ = [
|
|
|
976
1023
|
"AgentUpdateRequestTools",
|
|
977
1024
|
"AgentUpdateRequestToolsTypedDict",
|
|
978
1025
|
"AgentUpdateRequestTypedDict",
|
|
1026
|
+
"AgentVersion",
|
|
1027
|
+
"AgentVersionTypedDict",
|
|
1028
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequest",
|
|
1029
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict",
|
|
979
1030
|
"AgentsAPIV1AgentsDeleteRequest",
|
|
980
1031
|
"AgentsAPIV1AgentsDeleteRequestTypedDict",
|
|
981
1032
|
"AgentsAPIV1AgentsGetRequest",
|
|
@@ -984,6 +1035,8 @@ __all__ = [
|
|
|
984
1035
|
"AgentsAPIV1AgentsGetVersionRequestTypedDict",
|
|
985
1036
|
"AgentsAPIV1AgentsListRequest",
|
|
986
1037
|
"AgentsAPIV1AgentsListRequestTypedDict",
|
|
1038
|
+
"AgentsAPIV1AgentsListVersionAliasesRequest",
|
|
1039
|
+
"AgentsAPIV1AgentsListVersionAliasesRequestTypedDict",
|
|
987
1040
|
"AgentsAPIV1AgentsListVersionsRequest",
|
|
988
1041
|
"AgentsAPIV1AgentsListVersionsRequestTypedDict",
|
|
989
1042
|
"AgentsAPIV1AgentsUpdateRequest",
|
|
@@ -1184,12 +1237,18 @@ __all__ = [
|
|
|
1184
1237
|
"ConversationResponseObject",
|
|
1185
1238
|
"ConversationResponseTypedDict",
|
|
1186
1239
|
"ConversationRestartRequest",
|
|
1240
|
+
"ConversationRestartRequestAgentVersion",
|
|
1241
|
+
"ConversationRestartRequestAgentVersionTypedDict",
|
|
1187
1242
|
"ConversationRestartRequestHandoffExecution",
|
|
1188
1243
|
"ConversationRestartRequestTypedDict",
|
|
1189
1244
|
"ConversationRestartStreamRequest",
|
|
1245
|
+
"ConversationRestartStreamRequestAgentVersion",
|
|
1246
|
+
"ConversationRestartStreamRequestAgentVersionTypedDict",
|
|
1190
1247
|
"ConversationRestartStreamRequestHandoffExecution",
|
|
1191
1248
|
"ConversationRestartStreamRequestTypedDict",
|
|
1192
1249
|
"ConversationStreamRequest",
|
|
1250
|
+
"ConversationStreamRequestAgentVersion",
|
|
1251
|
+
"ConversationStreamRequestAgentVersionTypedDict",
|
|
1193
1252
|
"ConversationStreamRequestHandoffExecution",
|
|
1194
1253
|
"ConversationStreamRequestTools",
|
|
1195
1254
|
"ConversationStreamRequestToolsTypedDict",
|
|
@@ -1431,6 +1490,7 @@ __all__ = [
|
|
|
1431
1490
|
"ListSharingOutTypedDict",
|
|
1432
1491
|
"Loc",
|
|
1433
1492
|
"LocTypedDict",
|
|
1493
|
+
"Message",
|
|
1434
1494
|
"MessageEntries",
|
|
1435
1495
|
"MessageEntriesTypedDict",
|
|
1436
1496
|
"MessageInputContentChunks",
|
|
@@ -1456,6 +1516,7 @@ __all__ = [
|
|
|
1456
1516
|
"MessageOutputEventRole",
|
|
1457
1517
|
"MessageOutputEventType",
|
|
1458
1518
|
"MessageOutputEventTypedDict",
|
|
1519
|
+
"MessageTypedDict",
|
|
1459
1520
|
"Messages",
|
|
1460
1521
|
"MessagesTypedDict",
|
|
1461
1522
|
"MetricOut",
|
|
@@ -1506,7 +1567,19 @@ __all__ = [
|
|
|
1506
1567
|
"PredictionTypedDict",
|
|
1507
1568
|
"ProcessingStatusOut",
|
|
1508
1569
|
"ProcessingStatusOutTypedDict",
|
|
1570
|
+
"QueryParamAgentVersion",
|
|
1571
|
+
"QueryParamAgentVersionTypedDict",
|
|
1509
1572
|
"QueryParamStatus",
|
|
1573
|
+
"RealtimeTranscriptionError",
|
|
1574
|
+
"RealtimeTranscriptionErrorDetail",
|
|
1575
|
+
"RealtimeTranscriptionErrorDetailTypedDict",
|
|
1576
|
+
"RealtimeTranscriptionErrorTypedDict",
|
|
1577
|
+
"RealtimeTranscriptionSession",
|
|
1578
|
+
"RealtimeTranscriptionSessionCreated",
|
|
1579
|
+
"RealtimeTranscriptionSessionCreatedTypedDict",
|
|
1580
|
+
"RealtimeTranscriptionSessionTypedDict",
|
|
1581
|
+
"RealtimeTranscriptionSessionUpdated",
|
|
1582
|
+
"RealtimeTranscriptionSessionUpdatedTypedDict",
|
|
1510
1583
|
"ReferenceChunk",
|
|
1511
1584
|
"ReferenceChunkType",
|
|
1512
1585
|
"ReferenceChunkTypedDict",
|
|
@@ -1675,7 +1748,11 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1675
1748
|
"AgentTools": ".agent",
|
|
1676
1749
|
"AgentToolsTypedDict": ".agent",
|
|
1677
1750
|
"AgentTypedDict": ".agent",
|
|
1751
|
+
"AgentAliasResponse": ".agentaliasresponse",
|
|
1752
|
+
"AgentAliasResponseTypedDict": ".agentaliasresponse",
|
|
1678
1753
|
"AgentConversation": ".agentconversation",
|
|
1754
|
+
"AgentConversationAgentVersion": ".agentconversation",
|
|
1755
|
+
"AgentConversationAgentVersionTypedDict": ".agentconversation",
|
|
1679
1756
|
"AgentConversationObject": ".agentconversation",
|
|
1680
1757
|
"AgentConversationTypedDict": ".agentconversation",
|
|
1681
1758
|
"AgentCreationRequest": ".agentcreationrequest",
|
|
@@ -1692,12 +1769,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1692
1769
|
"AgentHandoffStartedEvent": ".agenthandoffstartedevent",
|
|
1693
1770
|
"AgentHandoffStartedEventType": ".agenthandoffstartedevent",
|
|
1694
1771
|
"AgentHandoffStartedEventTypedDict": ".agenthandoffstartedevent",
|
|
1772
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequest": ".agents_api_v1_agents_create_or_update_aliasop",
|
|
1773
|
+
"AgentsAPIV1AgentsCreateOrUpdateAliasRequestTypedDict": ".agents_api_v1_agents_create_or_update_aliasop",
|
|
1695
1774
|
"AgentsAPIV1AgentsDeleteRequest": ".agents_api_v1_agents_deleteop",
|
|
1696
1775
|
"AgentsAPIV1AgentsDeleteRequestTypedDict": ".agents_api_v1_agents_deleteop",
|
|
1697
1776
|
"AgentsAPIV1AgentsGetVersionRequest": ".agents_api_v1_agents_get_versionop",
|
|
1698
1777
|
"AgentsAPIV1AgentsGetVersionRequestTypedDict": ".agents_api_v1_agents_get_versionop",
|
|
1699
1778
|
"AgentsAPIV1AgentsGetRequest": ".agents_api_v1_agents_getop",
|
|
1700
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",
|
|
1701
1784
|
"AgentsAPIV1AgentsListVersionsRequest": ".agents_api_v1_agents_list_versionsop",
|
|
1702
1785
|
"AgentsAPIV1AgentsListVersionsRequestTypedDict": ".agents_api_v1_agents_list_versionsop",
|
|
1703
1786
|
"AgentsAPIV1AgentsListRequest": ".agents_api_v1_agents_listop",
|
|
@@ -1913,6 +1996,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1913
1996
|
"ConversationMessages": ".conversationmessages",
|
|
1914
1997
|
"ConversationMessagesObject": ".conversationmessages",
|
|
1915
1998
|
"ConversationMessagesTypedDict": ".conversationmessages",
|
|
1999
|
+
"AgentVersion": ".conversationrequest",
|
|
2000
|
+
"AgentVersionTypedDict": ".conversationrequest",
|
|
1916
2001
|
"ConversationRequest": ".conversationrequest",
|
|
1917
2002
|
"ConversationRequestTypedDict": ".conversationrequest",
|
|
1918
2003
|
"HandoffExecution": ".conversationrequest",
|
|
@@ -1924,12 +2009,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1924
2009
|
"Outputs": ".conversationresponse",
|
|
1925
2010
|
"OutputsTypedDict": ".conversationresponse",
|
|
1926
2011
|
"ConversationRestartRequest": ".conversationrestartrequest",
|
|
2012
|
+
"ConversationRestartRequestAgentVersion": ".conversationrestartrequest",
|
|
2013
|
+
"ConversationRestartRequestAgentVersionTypedDict": ".conversationrestartrequest",
|
|
1927
2014
|
"ConversationRestartRequestHandoffExecution": ".conversationrestartrequest",
|
|
1928
2015
|
"ConversationRestartRequestTypedDict": ".conversationrestartrequest",
|
|
1929
2016
|
"ConversationRestartStreamRequest": ".conversationrestartstreamrequest",
|
|
2017
|
+
"ConversationRestartStreamRequestAgentVersion": ".conversationrestartstreamrequest",
|
|
2018
|
+
"ConversationRestartStreamRequestAgentVersionTypedDict": ".conversationrestartstreamrequest",
|
|
1930
2019
|
"ConversationRestartStreamRequestHandoffExecution": ".conversationrestartstreamrequest",
|
|
1931
2020
|
"ConversationRestartStreamRequestTypedDict": ".conversationrestartstreamrequest",
|
|
1932
2021
|
"ConversationStreamRequest": ".conversationstreamrequest",
|
|
2022
|
+
"ConversationStreamRequestAgentVersion": ".conversationstreamrequest",
|
|
2023
|
+
"ConversationStreamRequestAgentVersionTypedDict": ".conversationstreamrequest",
|
|
1933
2024
|
"ConversationStreamRequestHandoffExecution": ".conversationstreamrequest",
|
|
1934
2025
|
"ConversationStreamRequestTools": ".conversationstreamrequest",
|
|
1935
2026
|
"ConversationStreamRequestToolsTypedDict": ".conversationstreamrequest",
|
|
@@ -2237,6 +2328,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2237
2328
|
"PredictionTypedDict": ".prediction",
|
|
2238
2329
|
"ProcessingStatusOut": ".processingstatusout",
|
|
2239
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",
|
|
2240
2343
|
"ReferenceChunk": ".referencechunk",
|
|
2241
2344
|
"ReferenceChunkType": ".referencechunk",
|
|
2242
2345
|
"ReferenceChunkTypedDict": ".referencechunk",
|
|
@@ -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,13 +4,23 @@ 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
11
|
AgentConversationObject = Literal["conversation",]
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
AgentConversationAgentVersionTypedDict = TypeAliasType(
|
|
15
|
+
"AgentConversationAgentVersionTypedDict", Union[str, int]
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
AgentConversationAgentVersion = TypeAliasType(
|
|
20
|
+
"AgentConversationAgentVersion", Union[str, int]
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
14
24
|
class AgentConversationTypedDict(TypedDict):
|
|
15
25
|
id: str
|
|
16
26
|
created_at: datetime
|
|
@@ -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):
|
|
@@ -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
|
+
]
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
class AgentsAPIV1AgentsGetVersionRequestTypedDict(TypedDict):
|
|
10
10
|
agent_id: str
|
|
11
|
-
version:
|
|
11
|
+
version: str
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class AgentsAPIV1AgentsGetVersionRequest(BaseModel):
|
|
@@ -17,5 +17,5 @@ class AgentsAPIV1AgentsGetVersionRequest(BaseModel):
|
|
|
17
17
|
]
|
|
18
18
|
|
|
19
19
|
version: Annotated[
|
|
20
|
-
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
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
|
+
]
|
|
@@ -24,6 +24,8 @@ class AudioTranscriptionRequestTypedDict(TypedDict):
|
|
|
24
24
|
r"""Language of the audio, e.g. 'en'. Providing the language can boost accuracy."""
|
|
25
25
|
temperature: NotRequired[Nullable[float]]
|
|
26
26
|
stream: Literal[False]
|
|
27
|
+
diarize: NotRequired[bool]
|
|
28
|
+
context_bias: NotRequired[List[str]]
|
|
27
29
|
timestamp_granularities: NotRequired[List[TimestampGranularity]]
|
|
28
30
|
r"""Granularities of timestamps to include in the response."""
|
|
29
31
|
|
|
@@ -55,6 +57,10 @@ class AudioTranscriptionRequest(BaseModel):
|
|
|
55
57
|
FieldMetadata(multipart=True),
|
|
56
58
|
] = False
|
|
57
59
|
|
|
60
|
+
diarize: Annotated[Optional[bool], FieldMetadata(multipart=True)] = False
|
|
61
|
+
|
|
62
|
+
context_bias: Annotated[Optional[List[str]], FieldMetadata(multipart=True)] = None
|
|
63
|
+
|
|
58
64
|
timestamp_granularities: Annotated[
|
|
59
65
|
Optional[List[TimestampGranularity]], FieldMetadata(multipart=True)
|
|
60
66
|
] = None
|
|
@@ -69,6 +75,8 @@ class AudioTranscriptionRequest(BaseModel):
|
|
|
69
75
|
"language",
|
|
70
76
|
"temperature",
|
|
71
77
|
"stream",
|
|
78
|
+
"diarize",
|
|
79
|
+
"context_bias",
|
|
72
80
|
"timestamp_granularities",
|
|
73
81
|
]
|
|
74
82
|
nullable_fields = ["file_url", "file_id", "language", "temperature"]
|
|
@@ -23,6 +23,8 @@ class AudioTranscriptionRequestStreamTypedDict(TypedDict):
|
|
|
23
23
|
r"""Language of the audio, e.g. 'en'. Providing the language can boost accuracy."""
|
|
24
24
|
temperature: NotRequired[Nullable[float]]
|
|
25
25
|
stream: Literal[True]
|
|
26
|
+
diarize: NotRequired[bool]
|
|
27
|
+
context_bias: NotRequired[List[str]]
|
|
26
28
|
timestamp_granularities: NotRequired[List[TimestampGranularity]]
|
|
27
29
|
r"""Granularities of timestamps to include in the response."""
|
|
28
30
|
|
|
@@ -53,6 +55,10 @@ class AudioTranscriptionRequestStream(BaseModel):
|
|
|
53
55
|
FieldMetadata(multipart=True),
|
|
54
56
|
] = True
|
|
55
57
|
|
|
58
|
+
diarize: Annotated[Optional[bool], FieldMetadata(multipart=True)] = False
|
|
59
|
+
|
|
60
|
+
context_bias: Annotated[Optional[List[str]], FieldMetadata(multipart=True)] = None
|
|
61
|
+
|
|
56
62
|
timestamp_granularities: Annotated[
|
|
57
63
|
Optional[List[TimestampGranularity]], FieldMetadata(multipart=True)
|
|
58
64
|
] = None
|
|
@@ -67,6 +73,8 @@ class AudioTranscriptionRequestStream(BaseModel):
|
|
|
67
73
|
"language",
|
|
68
74
|
"temperature",
|
|
69
75
|
"stream",
|
|
76
|
+
"diarize",
|
|
77
|
+
"context_bias",
|
|
70
78
|
"timestamp_granularities",
|
|
71
79
|
]
|
|
72
80
|
nullable_fields = ["file_url", "file_id", "language", "temperature"]
|
|
@@ -48,6 +48,12 @@ Tools = Annotated[
|
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
AgentVersionTypedDict = TypeAliasType("AgentVersionTypedDict", Union[str, int])
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
AgentVersion = TypeAliasType("AgentVersion", Union[str, int])
|
|
55
|
+
|
|
56
|
+
|
|
51
57
|
class ConversationRequestTypedDict(TypedDict):
|
|
52
58
|
inputs: ConversationInputsTypedDict
|
|
53
59
|
stream: NotRequired[bool]
|
|
@@ -61,7 +67,7 @@ class ConversationRequestTypedDict(TypedDict):
|
|
|
61
67
|
description: NotRequired[Nullable[str]]
|
|
62
68
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
63
69
|
agent_id: NotRequired[Nullable[str]]
|
|
64
|
-
agent_version: NotRequired[Nullable[
|
|
70
|
+
agent_version: NotRequired[Nullable[AgentVersionTypedDict]]
|
|
65
71
|
model: NotRequired[Nullable[str]]
|
|
66
72
|
|
|
67
73
|
|
|
@@ -89,7 +95,7 @@ class ConversationRequest(BaseModel):
|
|
|
89
95
|
|
|
90
96
|
agent_id: OptionalNullable[str] = UNSET
|
|
91
97
|
|
|
92
|
-
agent_version: OptionalNullable[
|
|
98
|
+
agent_version: OptionalNullable[AgentVersion] = UNSET
|
|
93
99
|
|
|
94
100
|
model: OptionalNullable[str] = UNSET
|
|
95
101
|
|
|
@@ -5,8 +5,8 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict
|
|
|
5
5
|
from .conversationinputs import ConversationInputs, ConversationInputsTypedDict
|
|
6
6
|
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
7
|
from pydantic import model_serializer
|
|
8
|
-
from typing import Any, Dict, Literal, Optional
|
|
9
|
-
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
from typing import Any, Dict, Literal, Optional, Union
|
|
9
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
ConversationRestartRequestHandoffExecution = Literal[
|
|
@@ -15,6 +15,18 @@ ConversationRestartRequestHandoffExecution = Literal[
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
ConversationRestartRequestAgentVersionTypedDict = TypeAliasType(
|
|
19
|
+
"ConversationRestartRequestAgentVersionTypedDict", Union[str, int]
|
|
20
|
+
)
|
|
21
|
+
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
ConversationRestartRequestAgentVersion = TypeAliasType(
|
|
25
|
+
"ConversationRestartRequestAgentVersion", Union[str, int]
|
|
26
|
+
)
|
|
27
|
+
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
28
|
+
|
|
29
|
+
|
|
18
30
|
class ConversationRestartRequestTypedDict(TypedDict):
|
|
19
31
|
r"""Request to restart a new conversation from a given entry in the conversation."""
|
|
20
32
|
|
|
@@ -28,7 +40,9 @@ class ConversationRestartRequestTypedDict(TypedDict):
|
|
|
28
40
|
r"""White-listed arguments from the completion API"""
|
|
29
41
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
30
42
|
r"""Custom metadata for the conversation."""
|
|
31
|
-
agent_version: NotRequired[
|
|
43
|
+
agent_version: NotRequired[
|
|
44
|
+
Nullable[ConversationRestartRequestAgentVersionTypedDict]
|
|
45
|
+
]
|
|
32
46
|
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
33
47
|
|
|
34
48
|
|
|
@@ -52,7 +66,7 @@ class ConversationRestartRequest(BaseModel):
|
|
|
52
66
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
|
53
67
|
r"""Custom metadata for the conversation."""
|
|
54
68
|
|
|
55
|
-
agent_version: OptionalNullable[
|
|
69
|
+
agent_version: OptionalNullable[ConversationRestartRequestAgentVersion] = UNSET
|
|
56
70
|
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
57
71
|
|
|
58
72
|
@model_serializer(mode="wrap")
|
|
@@ -5,8 +5,8 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict
|
|
|
5
5
|
from .conversationinputs import ConversationInputs, ConversationInputsTypedDict
|
|
6
6
|
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
7
|
from pydantic import model_serializer
|
|
8
|
-
from typing import Any, Dict, Literal, Optional
|
|
9
|
-
from typing_extensions import NotRequired, TypedDict
|
|
8
|
+
from typing import Any, Dict, Literal, Optional, Union
|
|
9
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
ConversationRestartStreamRequestHandoffExecution = Literal[
|
|
@@ -15,6 +15,18 @@ ConversationRestartStreamRequestHandoffExecution = Literal[
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
ConversationRestartStreamRequestAgentVersionTypedDict = TypeAliasType(
|
|
19
|
+
"ConversationRestartStreamRequestAgentVersionTypedDict", Union[str, int]
|
|
20
|
+
)
|
|
21
|
+
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
ConversationRestartStreamRequestAgentVersion = TypeAliasType(
|
|
25
|
+
"ConversationRestartStreamRequestAgentVersion", Union[str, int]
|
|
26
|
+
)
|
|
27
|
+
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
28
|
+
|
|
29
|
+
|
|
18
30
|
class ConversationRestartStreamRequestTypedDict(TypedDict):
|
|
19
31
|
r"""Request to restart a new conversation from a given entry in the conversation."""
|
|
20
32
|
|
|
@@ -28,7 +40,9 @@ class ConversationRestartStreamRequestTypedDict(TypedDict):
|
|
|
28
40
|
r"""White-listed arguments from the completion API"""
|
|
29
41
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
30
42
|
r"""Custom metadata for the conversation."""
|
|
31
|
-
agent_version: NotRequired[
|
|
43
|
+
agent_version: NotRequired[
|
|
44
|
+
Nullable[ConversationRestartStreamRequestAgentVersionTypedDict]
|
|
45
|
+
]
|
|
32
46
|
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
33
47
|
|
|
34
48
|
|
|
@@ -54,7 +68,9 @@ class ConversationRestartStreamRequest(BaseModel):
|
|
|
54
68
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
|
55
69
|
r"""Custom metadata for the conversation."""
|
|
56
70
|
|
|
57
|
-
agent_version: OptionalNullable[
|
|
71
|
+
agent_version: OptionalNullable[ConversationRestartStreamRequestAgentVersion] = (
|
|
72
|
+
UNSET
|
|
73
|
+
)
|
|
58
74
|
r"""Specific version of the agent to use when restarting. If not provided, uses the current version."""
|
|
59
75
|
|
|
60
76
|
@model_serializer(mode="wrap")
|
|
@@ -48,6 +48,16 @@ ConversationStreamRequestTools = Annotated[
|
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
ConversationStreamRequestAgentVersionTypedDict = TypeAliasType(
|
|
52
|
+
"ConversationStreamRequestAgentVersionTypedDict", Union[str, int]
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
ConversationStreamRequestAgentVersion = TypeAliasType(
|
|
57
|
+
"ConversationStreamRequestAgentVersion", Union[str, int]
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
51
61
|
class ConversationStreamRequestTypedDict(TypedDict):
|
|
52
62
|
inputs: ConversationInputsTypedDict
|
|
53
63
|
stream: NotRequired[bool]
|
|
@@ -61,7 +71,7 @@ class ConversationStreamRequestTypedDict(TypedDict):
|
|
|
61
71
|
description: NotRequired[Nullable[str]]
|
|
62
72
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
63
73
|
agent_id: NotRequired[Nullable[str]]
|
|
64
|
-
agent_version: NotRequired[Nullable[
|
|
74
|
+
agent_version: NotRequired[Nullable[ConversationStreamRequestAgentVersionTypedDict]]
|
|
65
75
|
model: NotRequired[Nullable[str]]
|
|
66
76
|
|
|
67
77
|
|
|
@@ -91,7 +101,7 @@ class ConversationStreamRequest(BaseModel):
|
|
|
91
101
|
|
|
92
102
|
agent_id: OptionalNullable[str] = UNSET
|
|
93
103
|
|
|
94
|
-
agent_version: OptionalNullable[
|
|
104
|
+
agent_version: OptionalNullable[ConversationStreamRequestAgentVersion] = UNSET
|
|
95
105
|
|
|
96
106
|
model: OptionalNullable[str] = UNSET
|
|
97
107
|
|