mistralai 1.8.2__py3-none-any.whl → 1.9.2__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/_hooks/types.py +7 -0
- mistralai/_version.py +3 -3
- mistralai/accesses.py +672 -0
- mistralai/agents.py +8 -4
- mistralai/basesdk.py +12 -20
- mistralai/beta.py +4 -0
- mistralai/chat.py +8 -4
- mistralai/classifiers.py +8 -0
- mistralai/conversations.py +34 -14
- mistralai/documents.py +2136 -0
- mistralai/embeddings.py +2 -0
- mistralai/extra/run/context.py +2 -4
- mistralai/files.py +14 -2
- mistralai/fim.py +4 -0
- mistralai/httpclient.py +6 -16
- mistralai/jobs.py +10 -0
- mistralai/libraries.py +1041 -0
- mistralai/mistral_agents.py +10 -0
- mistralai/mistral_jobs.py +8 -0
- mistralai/models/__init__.py +1578 -721
- mistralai/models/agent.py +1 -1
- mistralai/models/agentconversation.py +1 -1
- mistralai/models/agentcreationrequest.py +1 -1
- mistralai/models/agenthandoffentry.py +1 -1
- mistralai/models/agents_api_v1_conversations_getop.py +2 -0
- mistralai/models/agents_api_v1_conversations_historyop.py +2 -0
- mistralai/models/agents_api_v1_conversations_messagesop.py +2 -0
- mistralai/models/agents_api_v1_conversations_restart_streamop.py +2 -0
- mistralai/models/agents_api_v1_conversations_restartop.py +2 -0
- mistralai/models/agentscompletionrequest.py +3 -1
- mistralai/models/agentscompletionstreamrequest.py +3 -1
- mistralai/models/agentupdaterequest.py +1 -1
- mistralai/models/assistantmessage.py +1 -1
- mistralai/models/basemodelcard.py +6 -1
- mistralai/models/batchjobin.py +1 -1
- mistralai/models/batchjobout.py +1 -1
- mistralai/models/chatcompletionrequest.py +3 -1
- mistralai/models/chatcompletionstreamrequest.py +3 -1
- mistralai/models/classifierdetailedjobout.py +1 -1
- mistralai/models/classifierftmodelout.py +1 -1
- mistralai/models/classifierjobout.py +1 -1
- mistralai/models/classifiertargetin.py +1 -1
- mistralai/models/classifiertrainingparameters.py +1 -1
- mistralai/models/classifiertrainingparametersin.py +1 -1
- mistralai/models/completionargs.py +1 -1
- mistralai/models/completiondetailedjobout.py +1 -1
- mistralai/models/completionftmodelout.py +1 -1
- mistralai/models/completionjobout.py +1 -1
- mistralai/models/completionresponsestreamchoice.py +1 -1
- mistralai/models/completiontrainingparameters.py +1 -1
- mistralai/models/completiontrainingparametersin.py +1 -1
- mistralai/models/contentchunk.py +3 -0
- mistralai/models/conversationevents.py +6 -0
- mistralai/models/conversationhistory.py +4 -4
- mistralai/models/conversationrequest.py +1 -1
- mistralai/models/conversationstreamrequest.py +1 -1
- mistralai/models/conversationusageinfo.py +1 -1
- mistralai/models/deltamessage.py +1 -1
- mistralai/models/documentout.py +105 -0
- mistralai/models/documenttextcontent.py +13 -0
- mistralai/models/documentupdatein.py +44 -0
- mistralai/models/documenturlchunk.py +1 -1
- mistralai/models/embeddingrequest.py +1 -1
- mistralai/models/entitytype.py +9 -0
- mistralai/models/eventout.py +1 -1
- mistralai/models/file.py +33 -0
- mistralai/models/filechunk.py +23 -0
- mistralai/models/files_api_routes_list_filesop.py +1 -1
- mistralai/models/files_api_routes_upload_fileop.py +2 -27
- mistralai/models/fileschema.py +1 -1
- mistralai/models/fimcompletionrequest.py +1 -1
- mistralai/models/fimcompletionstreamrequest.py +1 -1
- mistralai/models/ftmodelcard.py +6 -1
- mistralai/models/functioncallentry.py +1 -1
- mistralai/models/functionresultentry.py +1 -1
- mistralai/models/githubrepositoryin.py +1 -1
- mistralai/models/githubrepositoryout.py +1 -1
- mistralai/models/imageurl.py +1 -1
- mistralai/models/inputentries.py +21 -2
- mistralai/models/jobin.py +1 -1
- mistralai/models/jobmetadataout.py +1 -1
- mistralai/models/jobs_api_routes_batch_get_batch_jobsop.py +1 -1
- mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +1 -1
- mistralai/models/jsonschema.py +1 -1
- mistralai/models/legacyjobmetadataout.py +1 -1
- mistralai/models/libraries_delete_v1op.py +16 -0
- mistralai/models/libraries_documents_delete_v1op.py +21 -0
- mistralai/models/libraries_documents_get_extracted_text_signed_url_v1op.py +21 -0
- mistralai/models/libraries_documents_get_signed_url_v1op.py +21 -0
- mistralai/models/libraries_documents_get_status_v1op.py +21 -0
- mistralai/models/libraries_documents_get_text_content_v1op.py +21 -0
- mistralai/models/libraries_documents_get_v1op.py +21 -0
- mistralai/models/libraries_documents_list_v1op.py +78 -0
- mistralai/models/libraries_documents_reprocess_v1op.py +21 -0
- mistralai/models/libraries_documents_update_v1op.py +28 -0
- mistralai/models/libraries_documents_upload_v1op.py +56 -0
- mistralai/models/libraries_get_v1op.py +16 -0
- mistralai/models/libraries_share_create_v1op.py +22 -0
- mistralai/models/libraries_share_delete_v1op.py +23 -0
- mistralai/models/libraries_share_list_v1op.py +16 -0
- mistralai/models/libraries_update_v1op.py +23 -0
- mistralai/models/libraryin.py +50 -0
- mistralai/models/libraryinupdate.py +47 -0
- mistralai/models/libraryout.py +107 -0
- mistralai/models/listdocumentout.py +19 -0
- mistralai/models/listlibraryout.py +15 -0
- mistralai/models/listsharingout.py +15 -0
- mistralai/models/messageinputentry.py +12 -2
- mistralai/models/messageoutputentry.py +1 -1
- mistralai/models/messageoutputevent.py +1 -1
- mistralai/models/metricout.py +1 -1
- mistralai/models/modelcapabilities.py +3 -0
- mistralai/models/modelconversation.py +1 -1
- mistralai/models/ocrimageobject.py +1 -1
- mistralai/models/ocrpageobject.py +1 -1
- mistralai/models/ocrrequest.py +5 -3
- mistralai/models/ocrresponse.py +1 -1
- mistralai/models/ocrusageinfo.py +1 -1
- mistralai/models/paginationinfo.py +25 -0
- mistralai/models/processingstatusout.py +16 -0
- mistralai/models/responseformat.py +1 -1
- mistralai/models/retrievefileout.py +1 -1
- mistralai/models/shareenum.py +8 -0
- mistralai/models/sharingdelete.py +26 -0
- mistralai/models/sharingin.py +30 -0
- mistralai/models/sharingout.py +59 -0
- mistralai/models/ssetypes.py +1 -0
- mistralai/models/toolexecutiondeltaevent.py +34 -0
- mistralai/models/toolexecutionentry.py +4 -1
- mistralai/models/toolexecutionstartedevent.py +3 -0
- mistralai/models/toolfilechunk.py +1 -1
- mistralai/models/toolmessage.py +1 -1
- mistralai/models/toolreferencechunk.py +8 -5
- mistralai/models/updateftmodelin.py +1 -1
- mistralai/models/uploadfileout.py +1 -1
- mistralai/models/usermessage.py +1 -1
- mistralai/models/wandbintegration.py +1 -1
- mistralai/models/wandbintegrationout.py +1 -1
- mistralai/models_.py +14 -2
- mistralai/ocr.py +2 -0
- mistralai/sdk.py +68 -40
- mistralai/sdkconfiguration.py +0 -7
- mistralai/types/basemodel.py +3 -3
- mistralai/utils/__init__.py +131 -45
- mistralai/utils/datetimes.py +23 -0
- mistralai/utils/enums.py +67 -27
- mistralai/utils/forms.py +49 -28
- mistralai/utils/serializers.py +32 -3
- {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/METADATA +41 -7
- {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/RECORD +152 -113
- {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/LICENSE +0 -0
- {mistralai-1.8.2.dist-info → mistralai-1.9.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
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 typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DocumentTextContentTypedDict(TypedDict):
|
|
9
|
+
text: str
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DocumentTextContent(BaseModel):
|
|
13
|
+
text: str
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
|
+
from pydantic import model_serializer
|
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DocumentUpdateInTypedDict(TypedDict):
|
|
10
|
+
name: NotRequired[Nullable[str]]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DocumentUpdateIn(BaseModel):
|
|
14
|
+
name: OptionalNullable[str] = UNSET
|
|
15
|
+
|
|
16
|
+
@model_serializer(mode="wrap")
|
|
17
|
+
def serialize_model(self, handler):
|
|
18
|
+
optional_fields = ["name"]
|
|
19
|
+
nullable_fields = ["name"]
|
|
20
|
+
null_default_fields = []
|
|
21
|
+
|
|
22
|
+
serialized = handler(self)
|
|
23
|
+
|
|
24
|
+
m = {}
|
|
25
|
+
|
|
26
|
+
for n, f in type(self).model_fields.items():
|
|
27
|
+
k = f.alias or n
|
|
28
|
+
val = serialized.get(k)
|
|
29
|
+
serialized.pop(k, None)
|
|
30
|
+
|
|
31
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
32
|
+
is_set = (
|
|
33
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
34
|
+
or k in null_default_fields
|
|
35
|
+
) # pylint: disable=no-member
|
|
36
|
+
|
|
37
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
38
|
+
m[k] = val
|
|
39
|
+
elif val != UNSET_SENTINEL and (
|
|
40
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
41
|
+
):
|
|
42
|
+
m[k] = val
|
|
43
|
+
|
|
44
|
+
return m
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import UnrecognizedStr
|
|
5
|
+
from typing import Literal, Union
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
EntityType = Union[Literal["User", "Workspace", "Org"], UnrecognizedStr]
|
|
9
|
+
r"""The type of entity, used to share a library."""
|
mistralai/models/eventout.py
CHANGED
mistralai/models/file.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
import io
|
|
5
|
+
from mistralai.types import BaseModel
|
|
6
|
+
from mistralai.utils import FieldMetadata, MultipartFormMetadata
|
|
7
|
+
import pydantic
|
|
8
|
+
from typing import IO, Optional, Union
|
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FileTypedDict(TypedDict):
|
|
13
|
+
file_name: str
|
|
14
|
+
content: Union[bytes, IO[bytes], io.BufferedReader]
|
|
15
|
+
content_type: NotRequired[str]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class File(BaseModel):
|
|
19
|
+
file_name: Annotated[
|
|
20
|
+
str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
content: Annotated[
|
|
24
|
+
Union[bytes, IO[bytes], io.BufferedReader],
|
|
25
|
+
pydantic.Field(alias=""),
|
|
26
|
+
FieldMetadata(multipart=MultipartFormMetadata(content=True)),
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
content_type: Annotated[
|
|
30
|
+
Optional[str],
|
|
31
|
+
pydantic.Field(alias="Content-Type"),
|
|
32
|
+
FieldMetadata(multipart=True),
|
|
33
|
+
] = None
|
|
@@ -0,0 +1,23 @@
|
|
|
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 validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FileChunkTypedDict(TypedDict):
|
|
13
|
+
file_id: str
|
|
14
|
+
type: Literal["file"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FileChunk(BaseModel):
|
|
18
|
+
file_id: str
|
|
19
|
+
|
|
20
|
+
TYPE: Annotated[
|
|
21
|
+
Annotated[Optional[Literal["file"]], AfterValidator(validate_const("file"))],
|
|
22
|
+
pydantic.Field(alias="type"),
|
|
23
|
+
] = "file"
|
|
@@ -1,40 +1,15 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .file import File, FileTypedDict
|
|
4
5
|
from .filepurpose import FilePurpose
|
|
5
|
-
import io
|
|
6
6
|
from mistralai.types import BaseModel
|
|
7
7
|
from mistralai.utils import FieldMetadata, MultipartFormMetadata, validate_open_enum
|
|
8
|
-
import pydantic
|
|
9
8
|
from pydantic.functional_validators import PlainValidator
|
|
10
|
-
from typing import
|
|
9
|
+
from typing import Optional
|
|
11
10
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
class FileTypedDict(TypedDict):
|
|
15
|
-
file_name: str
|
|
16
|
-
content: Union[bytes, IO[bytes], io.BufferedReader]
|
|
17
|
-
content_type: NotRequired[str]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class File(BaseModel):
|
|
21
|
-
file_name: Annotated[
|
|
22
|
-
str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
content: Annotated[
|
|
26
|
-
Union[bytes, IO[bytes], io.BufferedReader],
|
|
27
|
-
pydantic.Field(alias=""),
|
|
28
|
-
FieldMetadata(multipart=MultipartFormMetadata(content=True)),
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
content_type: Annotated[
|
|
32
|
-
Optional[str],
|
|
33
|
-
pydantic.Field(alias="Content-Type"),
|
|
34
|
-
FieldMetadata(multipart=True),
|
|
35
|
-
] = None
|
|
36
|
-
|
|
37
|
-
|
|
38
13
|
class FilesAPIRoutesUploadFileMultiPartBodyParamsTypedDict(TypedDict):
|
|
39
14
|
file: FileTypedDict
|
|
40
15
|
r"""The File object (not file name) to be uploaded.
|
mistralai/models/fileschema.py
CHANGED
mistralai/models/ftmodelcard.py
CHANGED
|
@@ -30,6 +30,7 @@ class FTModelCardTypedDict(TypedDict):
|
|
|
30
30
|
max_context_length: NotRequired[int]
|
|
31
31
|
aliases: NotRequired[List[str]]
|
|
32
32
|
deprecation: NotRequired[Nullable[datetime]]
|
|
33
|
+
deprecation_replacement_model: NotRequired[Nullable[str]]
|
|
33
34
|
default_model_temperature: NotRequired[Nullable[float]]
|
|
34
35
|
type: FTModelCardType
|
|
35
36
|
archived: NotRequired[bool]
|
|
@@ -62,6 +63,8 @@ class FTModelCard(BaseModel):
|
|
|
62
63
|
|
|
63
64
|
deprecation: OptionalNullable[datetime] = UNSET
|
|
64
65
|
|
|
66
|
+
deprecation_replacement_model: OptionalNullable[str] = UNSET
|
|
67
|
+
|
|
65
68
|
default_model_temperature: OptionalNullable[float] = UNSET
|
|
66
69
|
|
|
67
70
|
TYPE: Annotated[
|
|
@@ -84,6 +87,7 @@ class FTModelCard(BaseModel):
|
|
|
84
87
|
"max_context_length",
|
|
85
88
|
"aliases",
|
|
86
89
|
"deprecation",
|
|
90
|
+
"deprecation_replacement_model",
|
|
87
91
|
"default_model_temperature",
|
|
88
92
|
"type",
|
|
89
93
|
"archived",
|
|
@@ -92,6 +96,7 @@ class FTModelCard(BaseModel):
|
|
|
92
96
|
"name",
|
|
93
97
|
"description",
|
|
94
98
|
"deprecation",
|
|
99
|
+
"deprecation_replacement_model",
|
|
95
100
|
"default_model_temperature",
|
|
96
101
|
]
|
|
97
102
|
null_default_fields = []
|
|
@@ -100,7 +105,7 @@ class FTModelCard(BaseModel):
|
|
|
100
105
|
|
|
101
106
|
m = {}
|
|
102
107
|
|
|
103
|
-
for n, f in self.model_fields.items():
|
|
108
|
+
for n, f in type(self).model_fields.items():
|
|
104
109
|
k = f.alias or n
|
|
105
110
|
val = serialized.get(k)
|
|
106
111
|
serialized.pop(k, None)
|
mistralai/models/imageurl.py
CHANGED
mistralai/models/inputentries.py
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .agenthandoffentry import AgentHandoffEntry, AgentHandoffEntryTypedDict
|
|
5
|
+
from .functioncallentry import FunctionCallEntry, FunctionCallEntryTypedDict
|
|
4
6
|
from .functionresultentry import FunctionResultEntry, FunctionResultEntryTypedDict
|
|
5
7
|
from .messageinputentry import MessageInputEntry, MessageInputEntryTypedDict
|
|
8
|
+
from .messageoutputentry import MessageOutputEntry, MessageOutputEntryTypedDict
|
|
9
|
+
from .toolexecutionentry import ToolExecutionEntry, ToolExecutionEntryTypedDict
|
|
6
10
|
from typing import Union
|
|
7
11
|
from typing_extensions import TypeAliasType
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
InputEntriesTypedDict = TypeAliasType(
|
|
11
15
|
"InputEntriesTypedDict",
|
|
12
|
-
Union[
|
|
16
|
+
Union[
|
|
17
|
+
FunctionResultEntryTypedDict,
|
|
18
|
+
MessageInputEntryTypedDict,
|
|
19
|
+
FunctionCallEntryTypedDict,
|
|
20
|
+
ToolExecutionEntryTypedDict,
|
|
21
|
+
MessageOutputEntryTypedDict,
|
|
22
|
+
AgentHandoffEntryTypedDict,
|
|
23
|
+
],
|
|
13
24
|
)
|
|
14
25
|
|
|
15
26
|
|
|
16
27
|
InputEntries = TypeAliasType(
|
|
17
|
-
"InputEntries",
|
|
28
|
+
"InputEntries",
|
|
29
|
+
Union[
|
|
30
|
+
FunctionResultEntry,
|
|
31
|
+
MessageInputEntry,
|
|
32
|
+
FunctionCallEntry,
|
|
33
|
+
ToolExecutionEntry,
|
|
34
|
+
MessageOutputEntry,
|
|
35
|
+
AgentHandoffEntry,
|
|
36
|
+
],
|
|
18
37
|
)
|
mistralai/models/jobin.py
CHANGED
|
@@ -135,7 +135,7 @@ class JobsAPIRoutesFineTuningGetFineTuningJobsRequest(BaseModel):
|
|
|
135
135
|
|
|
136
136
|
m = {}
|
|
137
137
|
|
|
138
|
-
for n, f in self.model_fields.items():
|
|
138
|
+
for n, f in type(self).model_fields.items():
|
|
139
139
|
k = f.alias or n
|
|
140
140
|
val = serialized.get(k)
|
|
141
141
|
serialized.pop(k, None)
|
mistralai/models/jsonschema.py
CHANGED
|
@@ -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 LibrariesDeleteV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LibrariesDeleteV1Request(BaseModel):
|
|
14
|
+
library_id: Annotated[
|
|
15
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
16
|
+
]
|
|
@@ -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 LibrariesDocumentsDeleteV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsDeleteV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -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 LibrariesDocumentsGetExtractedTextSignedURLV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsGetExtractedTextSignedURLV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -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 LibrariesDocumentsGetSignedURLV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsGetSignedURLV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -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 LibrariesDocumentsGetStatusV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsGetStatusV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -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 LibrariesDocumentsGetTextContentV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsGetTextContentV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -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 LibrariesDocumentsGetV1RequestTypedDict(TypedDict):
|
|
10
|
+
library_id: str
|
|
11
|
+
document_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class LibrariesDocumentsGetV1Request(BaseModel):
|
|
15
|
+
library_id: Annotated[
|
|
16
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
document_id: Annotated[
|
|
20
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
21
|
+
]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
|
+
from mistralai.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
|
|
6
|
+
from pydantic import model_serializer
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LibrariesDocumentsListV1RequestTypedDict(TypedDict):
|
|
12
|
+
library_id: str
|
|
13
|
+
search: NotRequired[Nullable[str]]
|
|
14
|
+
page_size: NotRequired[int]
|
|
15
|
+
page: NotRequired[int]
|
|
16
|
+
sort_by: NotRequired[str]
|
|
17
|
+
sort_order: NotRequired[str]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class LibrariesDocumentsListV1Request(BaseModel):
|
|
21
|
+
library_id: Annotated[
|
|
22
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
search: Annotated[
|
|
26
|
+
OptionalNullable[str],
|
|
27
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
28
|
+
] = UNSET
|
|
29
|
+
|
|
30
|
+
page_size: Annotated[
|
|
31
|
+
Optional[int],
|
|
32
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
33
|
+
] = 100
|
|
34
|
+
|
|
35
|
+
page: Annotated[
|
|
36
|
+
Optional[int],
|
|
37
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
38
|
+
] = 0
|
|
39
|
+
|
|
40
|
+
sort_by: Annotated[
|
|
41
|
+
Optional[str],
|
|
42
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
43
|
+
] = "created_at"
|
|
44
|
+
|
|
45
|
+
sort_order: Annotated[
|
|
46
|
+
Optional[str],
|
|
47
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
48
|
+
] = "desc"
|
|
49
|
+
|
|
50
|
+
@model_serializer(mode="wrap")
|
|
51
|
+
def serialize_model(self, handler):
|
|
52
|
+
optional_fields = ["search", "page_size", "page", "sort_by", "sort_order"]
|
|
53
|
+
nullable_fields = ["search"]
|
|
54
|
+
null_default_fields = []
|
|
55
|
+
|
|
56
|
+
serialized = handler(self)
|
|
57
|
+
|
|
58
|
+
m = {}
|
|
59
|
+
|
|
60
|
+
for n, f in type(self).model_fields.items():
|
|
61
|
+
k = f.alias or n
|
|
62
|
+
val = serialized.get(k)
|
|
63
|
+
serialized.pop(k, None)
|
|
64
|
+
|
|
65
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
66
|
+
is_set = (
|
|
67
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
68
|
+
or k in null_default_fields
|
|
69
|
+
) # pylint: disable=no-member
|
|
70
|
+
|
|
71
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
72
|
+
m[k] = val
|
|
73
|
+
elif val != UNSET_SENTINEL and (
|
|
74
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
75
|
+
):
|
|
76
|
+
m[k] = val
|
|
77
|
+
|
|
78
|
+
return m
|