mistralai 1.2.2__py3-none-any.whl → 1.2.3__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 +1 -1
- mistralai/models/__init__.py +13 -1
- mistralai/models/contentchunk.py +7 -2
- mistralai/models/referencechunk.py +28 -0
- mistralai/models/toolmessage.py +11 -4
- mistralai/sdkconfiguration.py +3 -3
- {mistralai-1.2.2.dist-info → mistralai-1.2.3.dist-info}/METADATA +1 -1
- {mistralai-1.2.2.dist-info → mistralai-1.2.3.dist-info}/RECORD +22 -19
- mistralai_azure/_version.py +1 -1
- mistralai_azure/models/__init__.py +13 -1
- mistralai_azure/models/contentchunk.py +12 -2
- mistralai_azure/models/referencechunk.py +28 -0
- mistralai_azure/models/toolmessage.py +11 -4
- mistralai_azure/sdkconfiguration.py +3 -3
- mistralai_gcp/_version.py +1 -1
- mistralai_gcp/models/__init__.py +13 -1
- mistralai_gcp/models/contentchunk.py +12 -2
- mistralai_gcp/models/referencechunk.py +28 -0
- mistralai_gcp/models/toolmessage.py +11 -4
- mistralai_gcp/sdkconfiguration.py +3 -3
- {mistralai-1.2.2.dist-info → mistralai-1.2.3.dist-info}/LICENSE +0 -0
- {mistralai-1.2.2.dist-info → mistralai-1.2.3.dist-info}/WHEEL +0 -0
mistralai/_version.py
CHANGED
mistralai/models/__init__.py
CHANGED
|
@@ -269,6 +269,7 @@ from .listfilesout import ListFilesOut, ListFilesOutTypedDict
|
|
|
269
269
|
from .metricout import MetricOut, MetricOutTypedDict
|
|
270
270
|
from .modelcapabilities import ModelCapabilities, ModelCapabilitiesTypedDict
|
|
271
271
|
from .modellist import Data, DataTypedDict, ModelList, ModelListTypedDict
|
|
272
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkType, ReferenceChunkTypedDict
|
|
272
273
|
from .responseformat import ResponseFormat, ResponseFormatTypedDict
|
|
273
274
|
from .responseformats import ResponseFormats
|
|
274
275
|
from .retrieve_model_v1_models_model_id_getop import (
|
|
@@ -294,7 +295,13 @@ from .tool import Tool, ToolTypedDict
|
|
|
294
295
|
from .toolcall import ToolCall, ToolCallTypedDict
|
|
295
296
|
from .toolchoice import ToolChoice, ToolChoiceTypedDict
|
|
296
297
|
from .toolchoiceenum import ToolChoiceEnum
|
|
297
|
-
from .toolmessage import
|
|
298
|
+
from .toolmessage import (
|
|
299
|
+
ToolMessage,
|
|
300
|
+
ToolMessageContent,
|
|
301
|
+
ToolMessageContentTypedDict,
|
|
302
|
+
ToolMessageRole,
|
|
303
|
+
ToolMessageTypedDict,
|
|
304
|
+
)
|
|
298
305
|
from .tooltypes import ToolTypes
|
|
299
306
|
from .trainingfile import TrainingFile, TrainingFileTypedDict
|
|
300
307
|
from .trainingparameters import TrainingParameters, TrainingParametersTypedDict
|
|
@@ -553,6 +560,9 @@ __all__ = [
|
|
|
553
560
|
"One",
|
|
554
561
|
"OneTypedDict",
|
|
555
562
|
"QueryParamStatus",
|
|
563
|
+
"ReferenceChunk",
|
|
564
|
+
"ReferenceChunkType",
|
|
565
|
+
"ReferenceChunkTypedDict",
|
|
556
566
|
"Repositories",
|
|
557
567
|
"RepositoriesTypedDict",
|
|
558
568
|
"ResponseFormat",
|
|
@@ -587,6 +597,8 @@ __all__ = [
|
|
|
587
597
|
"ToolChoiceEnum",
|
|
588
598
|
"ToolChoiceTypedDict",
|
|
589
599
|
"ToolMessage",
|
|
600
|
+
"ToolMessageContent",
|
|
601
|
+
"ToolMessageContentTypedDict",
|
|
590
602
|
"ToolMessageRole",
|
|
591
603
|
"ToolMessageTypedDict",
|
|
592
604
|
"ToolTypedDict",
|
mistralai/models/contentchunk.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict
|
|
5
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict
|
|
5
6
|
from .textchunk import TextChunk, TextChunkTypedDict
|
|
6
7
|
from mistralai.utils import get_discriminator
|
|
7
8
|
from pydantic import Discriminator, Tag
|
|
@@ -9,12 +10,16 @@ from typing import Union
|
|
|
9
10
|
from typing_extensions import Annotated
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
ContentChunkTypedDict = Union[
|
|
13
|
+
ContentChunkTypedDict = Union[
|
|
14
|
+
TextChunkTypedDict, ImageURLChunkTypedDict, ReferenceChunkTypedDict
|
|
15
|
+
]
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
ContentChunk = Annotated[
|
|
16
19
|
Union[
|
|
17
|
-
Annotated[ImageURLChunk, Tag("image_url")],
|
|
20
|
+
Annotated[ImageURLChunk, Tag("image_url")],
|
|
21
|
+
Annotated[TextChunk, Tag("text")],
|
|
22
|
+
Annotated[ReferenceChunk, Tag("reference")],
|
|
18
23
|
],
|
|
19
24
|
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
20
25
|
]
|
|
@@ -0,0 +1,28 @@
|
|
|
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 List, Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
ReferenceChunkType = Literal["reference"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ReferenceChunkTypedDict(TypedDict):
|
|
16
|
+
reference_ids: List[int]
|
|
17
|
+
type: ReferenceChunkType
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ReferenceChunk(BaseModel):
|
|
21
|
+
reference_ids: List[int]
|
|
22
|
+
|
|
23
|
+
TYPE: Annotated[
|
|
24
|
+
Annotated[
|
|
25
|
+
Optional[ReferenceChunkType], AfterValidator(validate_const("reference"))
|
|
26
|
+
],
|
|
27
|
+
pydantic.Field(alias="type"),
|
|
28
|
+
] = "reference"
|
mistralai/models/toolmessage.py
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .contentchunk import ContentChunk, ContentChunkTypedDict
|
|
4
5
|
from mistralai.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
6
|
from pydantic import model_serializer
|
|
6
|
-
from typing import Literal, Optional
|
|
7
|
+
from typing import List, Literal, Optional, Union
|
|
7
8
|
from typing_extensions import NotRequired, TypedDict
|
|
8
9
|
|
|
9
10
|
|
|
11
|
+
ToolMessageContentTypedDict = Union[str, List[ContentChunkTypedDict]]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
ToolMessageContent = Union[str, List[ContentChunk]]
|
|
15
|
+
|
|
16
|
+
|
|
10
17
|
ToolMessageRole = Literal["tool"]
|
|
11
18
|
|
|
12
19
|
|
|
13
20
|
class ToolMessageTypedDict(TypedDict):
|
|
14
|
-
content:
|
|
21
|
+
content: Nullable[ToolMessageContentTypedDict]
|
|
15
22
|
tool_call_id: NotRequired[Nullable[str]]
|
|
16
23
|
name: NotRequired[Nullable[str]]
|
|
17
24
|
role: NotRequired[ToolMessageRole]
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
class ToolMessage(BaseModel):
|
|
21
|
-
content:
|
|
28
|
+
content: Nullable[ToolMessageContent]
|
|
22
29
|
|
|
23
30
|
tool_call_id: OptionalNullable[str] = UNSET
|
|
24
31
|
|
|
@@ -29,7 +36,7 @@ class ToolMessage(BaseModel):
|
|
|
29
36
|
@model_serializer(mode="wrap")
|
|
30
37
|
def serialize_model(self, handler):
|
|
31
38
|
optional_fields = ["tool_call_id", "name", "role"]
|
|
32
|
-
nullable_fields = ["tool_call_id", "name"]
|
|
39
|
+
nullable_fields = ["content", "tool_call_id", "name"]
|
|
33
40
|
null_default_fields = []
|
|
34
41
|
|
|
35
42
|
serialized = handler(self)
|
mistralai/sdkconfiguration.py
CHANGED
|
@@ -28,9 +28,9 @@ class SDKConfiguration:
|
|
|
28
28
|
server: Optional[str] = ""
|
|
29
29
|
language: str = "python"
|
|
30
30
|
openapi_doc_version: str = "0.0.2"
|
|
31
|
-
sdk_version: str = "1.2.
|
|
32
|
-
gen_version: str = "2.
|
|
33
|
-
user_agent: str = "speakeasy-sdk/python 1.2.
|
|
31
|
+
sdk_version: str = "1.2.3"
|
|
32
|
+
gen_version: str = "2.460.1"
|
|
33
|
+
user_agent: str = "speakeasy-sdk/python 1.2.3 2.460.1 0.0.2 mistralai"
|
|
34
34
|
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
|
|
35
35
|
timeout_ms: Optional[int] = None
|
|
36
36
|
|
|
@@ -4,11 +4,11 @@ mistralai_azure/_hooks/custom_user_agent.py,sha256=1VAY7_oknRQGL8QNO0uCRHg6r7XYl
|
|
|
4
4
|
mistralai_azure/_hooks/registration.py,sha256=5BN-U92pwP5kUaN7EOso2vWrwZlLvRcU5Coccibqp20,741
|
|
5
5
|
mistralai_azure/_hooks/sdkhooks.py,sha256=urOhVMYX_n5KgMoNDNmGs4fsgUWoeSG6_GarhPxH-YU,2565
|
|
6
6
|
mistralai_azure/_hooks/types.py,sha256=ealwk4q-4oIauxj5Nyx9xmu9vX0nm4vcDALDy4qydgE,2576
|
|
7
|
-
mistralai_azure/_version.py,sha256=
|
|
7
|
+
mistralai_azure/_version.py,sha256=XUjO99pmQX1np8WHgz8F48bgOPxWExv6D_pZv0-mKks,319
|
|
8
8
|
mistralai_azure/basesdk.py,sha256=ZtCvahXCyuWen9Jk7BC8BoeChQZCb04JAA6oG-0SOaE,11218
|
|
9
9
|
mistralai_azure/chat.py,sha256=6nuvRX1Gf3HTVPCHN31RMsL1Vx_jgpu1Q6XmhaJ9r9M,31957
|
|
10
10
|
mistralai_azure/httpclient.py,sha256=S_ItzEchFX-znIdHD6i5-a91H0Dn5QxpT0KhucdHBbI,2595
|
|
11
|
-
mistralai_azure/models/__init__.py,sha256=
|
|
11
|
+
mistralai_azure/models/__init__.py,sha256=tUGnhgKbxZMd8R7DK09Zy0TRlcp5fg32LaHgwE6wtRs,5474
|
|
12
12
|
mistralai_azure/models/assistantmessage.py,sha256=B8Q9_bgiIKne8sJzvWqiff2XehYkOBuBLWuGFKr_s1E,2115
|
|
13
13
|
mistralai_azure/models/chatcompletionchoice.py,sha256=-JE13p36mWnyc3zxnHLJp1Q43QVgj5QRurnZslXdJc0,935
|
|
14
14
|
mistralai_azure/models/chatcompletionrequest.py,sha256=VrjROK0FypeHKfq-ppp1SPNXdH4Ut70BuKQisFV_VYQ,9231
|
|
@@ -17,12 +17,13 @@ mistralai_azure/models/chatcompletionstreamrequest.py,sha256=XugmBCTRm2IB183Wrz4
|
|
|
17
17
|
mistralai_azure/models/completionchunk.py,sha256=yoA0tYoyK5RChQPbEvYUi1BVmuyH-QT5IYwEYJNtsXM,877
|
|
18
18
|
mistralai_azure/models/completionevent.py,sha256=8wkRAMMpDFfhFSm7OEmli80lsK98Tir7R6IxW-KxeuE,405
|
|
19
19
|
mistralai_azure/models/completionresponsestreamchoice.py,sha256=c6BncIEgKnK4HUPCeIhLfVc3RgxXKNcxp2JrlObUu9E,1834
|
|
20
|
-
mistralai_azure/models/contentchunk.py,sha256=
|
|
20
|
+
mistralai_azure/models/contentchunk.py,sha256=JmJXbT_TWcMkXk6aFICA4WLa8LOrJq1LFw9wQLHC_zY,665
|
|
21
21
|
mistralai_azure/models/deltamessage.py,sha256=1Mou57fy_Fppdn9SA5mewAfZtwoN9-mtX1WMcI2Qeak,1888
|
|
22
22
|
mistralai_azure/models/function.py,sha256=dMKaqEIbvXIQWf6NROjlVaHGOU6weso7AVCIG691ULI,473
|
|
23
23
|
mistralai_azure/models/functioncall.py,sha256=IZ4qiW94J282ooN4Kp96xE_jCt6q-RS3qhc0naCkl-Y,482
|
|
24
24
|
mistralai_azure/models/functionname.py,sha256=4rGsO-FYjvLMRGDBbdZ3cLyiiwml_voRQQ924K2_S1M,473
|
|
25
25
|
mistralai_azure/models/httpvalidationerror.py,sha256=tcUK2zfyCZ1TJjmvF93E9G2Ah-S2UUSpM-ZJBbR4hgc,616
|
|
26
|
+
mistralai_azure/models/referencechunk.py,sha256=ONFQVq4kJXhXLipwherS4H_Js3N8AuD9dYIVfoBQ6Nc,775
|
|
26
27
|
mistralai_azure/models/responseformat.py,sha256=ObWSXbwECiJJ0j0Ra_Yh2kpcC0zB2IZoGk_HpWBTwtc,1051
|
|
27
28
|
mistralai_azure/models/responseformats.py,sha256=oeXHoVUoZrZwrz-0cm-rHj5sHygv9MpeqgdummGa8ww,488
|
|
28
29
|
mistralai_azure/models/sdkerror.py,sha256=kd75e3JYF2TXNgRZopcV-oGdBWoBZqRcvrwqn2fsFYs,528
|
|
@@ -33,14 +34,14 @@ mistralai_azure/models/tool.py,sha256=Li0qpB3KgGN0mtT8lKG1N_MfOOwGvzok0ZRK_J3Us8
|
|
|
33
34
|
mistralai_azure/models/toolcall.py,sha256=RTTdfhcbbH6kq7L1MaQ0Z7bl7xdrE6DZxYPZaIe0lEo,778
|
|
34
35
|
mistralai_azure/models/toolchoice.py,sha256=etDg86Frx-VoiccMlGP_Va3Vipy4UGMa9LMUGQFY6UY,1033
|
|
35
36
|
mistralai_azure/models/toolchoiceenum.py,sha256=Ca4ileCwuOjfPzIXLRIxT3RkE5zR7oqV6nXU-UjW0w0,197
|
|
36
|
-
mistralai_azure/models/toolmessage.py,sha256=
|
|
37
|
+
mistralai_azure/models/toolmessage.py,sha256=5MK3Tp8-26aFvLtxV6laFYufcpy6AefRu7dHJVWF0rg,1965
|
|
37
38
|
mistralai_azure/models/tooltypes.py,sha256=AGC_JaMGWyMRJ1rCIGhLh5DWbyohdiQkEeKoW5a97Ro,250
|
|
38
39
|
mistralai_azure/models/usageinfo.py,sha256=jG6lRE1t4wDqD4Cote82IFLQtWA_eJmTwP66TI8botg,407
|
|
39
40
|
mistralai_azure/models/usermessage.py,sha256=1nU5Hc6Mv3STaopLTcIwNMUACRbJh6kACURtBD11TYI,1695
|
|
40
41
|
mistralai_azure/models/validationerror.py,sha256=du2NEF6bMVx_b10g741vkbUE1RIQnO4y4xnukvAsbAY,464
|
|
41
42
|
mistralai_azure/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
42
43
|
mistralai_azure/sdk.py,sha256=ZVPE9lFzswEMlHw_kiG_j5vzoJ5BwEYlVLCYGmYDjpA,3936
|
|
43
|
-
mistralai_azure/sdkconfiguration.py,sha256=
|
|
44
|
+
mistralai_azure/sdkconfiguration.py,sha256=URpSMKzTjPeqoViPC3JcH1EUdy-0_VAcvHzXeQeCjBw,1706
|
|
44
45
|
mistralai_azure/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
45
46
|
mistralai_azure/types/basemodel.py,sha256=PexI39iKiOkIlobB8Ueo0yn8PLHp6_wb-WO-zelNDZY,1170
|
|
46
47
|
mistralai_azure/utils/__init__.py,sha256=1x4KfQf2ULtO_aOk_M2RMCimoz8jgcW0RZd-f34KDAs,2365
|
|
@@ -64,12 +65,12 @@ mistralai_gcp/_hooks/custom_user_agent.py,sha256=1VAY7_oknRQGL8QNO0uCRHg6r7XYlss
|
|
|
64
65
|
mistralai_gcp/_hooks/registration.py,sha256=5BN-U92pwP5kUaN7EOso2vWrwZlLvRcU5Coccibqp20,741
|
|
65
66
|
mistralai_gcp/_hooks/sdkhooks.py,sha256=nr_ACx8Rn5xvTkmZP6_EI-f_0hw8wMyPqPHNvjAWAxI,2563
|
|
66
67
|
mistralai_gcp/_hooks/types.py,sha256=DJD5-sKZfAj0tKgSU5w0YNuJE_C8PDa5n1V27T_7SmE,2574
|
|
67
|
-
mistralai_gcp/_version.py,sha256=
|
|
68
|
+
mistralai_gcp/_version.py,sha256=yKedfo-mdDZ2lh-brndG2TXcE4w37UWJhP4KIRqMnS0,317
|
|
68
69
|
mistralai_gcp/basesdk.py,sha256=cJcOSsYxfNznSOMrDlh0z06_e8HXnlIFCfIYm0yOPlc,11212
|
|
69
70
|
mistralai_gcp/chat.py,sha256=DXLTCQ159R7hlcMeBN63w3erZv__k36aVEsj6MnsZVg,31873
|
|
70
71
|
mistralai_gcp/fim.py,sha256=qVr3jNIbWYXTYEZfj9GTKTAaLG2z7bGCADXTiyNiswk,25395
|
|
71
72
|
mistralai_gcp/httpclient.py,sha256=S_ItzEchFX-znIdHD6i5-a91H0Dn5QxpT0KhucdHBbI,2595
|
|
72
|
-
mistralai_gcp/models/__init__.py,sha256=
|
|
73
|
+
mistralai_gcp/models/__init__.py,sha256=FgLN8dDWM4XLCS1EWH--nk90Fnnrypsa2EEu5Yv84iI,6296
|
|
73
74
|
mistralai_gcp/models/assistantmessage.py,sha256=oESoVA3BJZMPmj8ojdPi-wqb0WzXCCToHa9cO4qzAlY,2113
|
|
74
75
|
mistralai_gcp/models/chatcompletionchoice.py,sha256=1t3Sb_IICDH7gyyEMX-WuxHnSVV-PZTLfpUjkUVp3do,931
|
|
75
76
|
mistralai_gcp/models/chatcompletionrequest.py,sha256=yKWizYia91JDpCm6UwRATlgmplrN7IeZM_tJdfEV_8Q,9278
|
|
@@ -78,7 +79,7 @@ mistralai_gcp/models/chatcompletionstreamrequest.py,sha256=UNQ9ioJKTNS2xqXkiMhOR
|
|
|
78
79
|
mistralai_gcp/models/completionchunk.py,sha256=0DBDcrqVWrUskHA3hHYtuWk2E4JcJy_zc_LiGyLHBlA,875
|
|
79
80
|
mistralai_gcp/models/completionevent.py,sha256=cP7Q5dN4Z46FQTlyCYeIwvqt7pgN-22jNPD2bi7Eals,403
|
|
80
81
|
mistralai_gcp/models/completionresponsestreamchoice.py,sha256=MdZaPMSqFbIbenEAdPyYMFemsFSZdPglEEt5ssZ3x7E,1830
|
|
81
|
-
mistralai_gcp/models/contentchunk.py,sha256=
|
|
82
|
+
mistralai_gcp/models/contentchunk.py,sha256=ADfEgsEBqpFDhCCgqet-JTZ9QcVpez1PzpHAnrTai14,663
|
|
82
83
|
mistralai_gcp/models/deltamessage.py,sha256=YFmrqPchctnEB-UQdr7Mmd2-UFE86SX47kOQVtYVv1U,1886
|
|
83
84
|
mistralai_gcp/models/fimcompletionrequest.py,sha256=ZWpkEGtRmPgdhD9KwbnaixU3O8fD-gpArkDDQb9cn40,6513
|
|
84
85
|
mistralai_gcp/models/fimcompletionresponse.py,sha256=zUG83S6DchgEYsSG1dkOSuoOFHvlAR62gCoN9UzF06A,794
|
|
@@ -87,6 +88,7 @@ mistralai_gcp/models/function.py,sha256=5DkjJlymCiGz9GLfspaHAD8gxVXllSjySHeEhsgf
|
|
|
87
88
|
mistralai_gcp/models/functioncall.py,sha256=NOwWgvq86cdR6o0Y0wDalczc7aDtzxQaoqDsVSTSPSU,480
|
|
88
89
|
mistralai_gcp/models/functionname.py,sha256=Rp4TPQA1IvhnBZx-GwBF1fFyAd6w5Ys5A84waQ9fYKg,471
|
|
89
90
|
mistralai_gcp/models/httpvalidationerror.py,sha256=wGmVyH_T7APhs_mCpOkumZ3x15FQ95cL-GH5M2iLst8,612
|
|
91
|
+
mistralai_gcp/models/referencechunk.py,sha256=j6Cg6fRhhWvsaXRORwghnvBpHyin9y7yo6s1PB_qEeg,771
|
|
90
92
|
mistralai_gcp/models/responseformat.py,sha256=2FG3eNkJyeSgh7YzQ-saib43ILvSVElV42h8hIffZ1g,1049
|
|
91
93
|
mistralai_gcp/models/responseformats.py,sha256=oeXHoVUoZrZwrz-0cm-rHj5sHygv9MpeqgdummGa8ww,488
|
|
92
94
|
mistralai_gcp/models/sdkerror.py,sha256=kd75e3JYF2TXNgRZopcV-oGdBWoBZqRcvrwqn2fsFYs,528
|
|
@@ -97,14 +99,14 @@ mistralai_gcp/models/tool.py,sha256=u2mQpXPj38x4CfEIbx0TwTeQx5qmkjt1wUTWTZY2dak,
|
|
|
97
99
|
mistralai_gcp/models/toolcall.py,sha256=2qaVi_1HrjESewPBG3FdZrllVmbYwkcnBm2bnVCoVlM,774
|
|
98
100
|
mistralai_gcp/models/toolchoice.py,sha256=GQcyKrGg6CwJC2Wx-hBfD8giDZiFoEuRJN3ZXmnkU1Q,1029
|
|
99
101
|
mistralai_gcp/models/toolchoiceenum.py,sha256=Ca4ileCwuOjfPzIXLRIxT3RkE5zR7oqV6nXU-UjW0w0,197
|
|
100
|
-
mistralai_gcp/models/toolmessage.py,sha256=
|
|
102
|
+
mistralai_gcp/models/toolmessage.py,sha256=ks8gmUjkJL5hkn_1RZP6MmjUL78Tu7zNY90z9PWtceU,1963
|
|
101
103
|
mistralai_gcp/models/tooltypes.py,sha256=6vY1LVrp7xzXlidl1x-3SSwqdx9TBlecIeKd4sU7e6I,248
|
|
102
104
|
mistralai_gcp/models/usageinfo.py,sha256=Uo2LJB58JMzlrmnfMUQnDxiMCINMS63ejp-sbOq9O-Q,405
|
|
103
105
|
mistralai_gcp/models/usermessage.py,sha256=Wv_yQOP6K81KZZ13Jn0N4i7nM8qh3yuPO0t0pgq-JHQ,1693
|
|
104
106
|
mistralai_gcp/models/validationerror.py,sha256=nPH4v5nEe7Vy-l4fYft3vvfb67yhGYHhoAUFDkupEZg,462
|
|
105
107
|
mistralai_gcp/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
106
108
|
mistralai_gcp/sdk.py,sha256=qmgp6E5LTBMnNN3mc1aDzmnHnvRQNTR7JEJgjBkYGWg,6730
|
|
107
|
-
mistralai_gcp/sdkconfiguration.py,sha256=
|
|
109
|
+
mistralai_gcp/sdkconfiguration.py,sha256=jqktJNPLQ_B39gK9UPvcfPE_rHMYCpOmcOFRehmV5oI,1700
|
|
108
110
|
mistralai_gcp/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
109
111
|
mistralai_gcp/types/basemodel.py,sha256=PexI39iKiOkIlobB8Ueo0yn8PLHp6_wb-WO-zelNDZY,1170
|
|
110
112
|
mistralai_gcp/utils/__init__.py,sha256=1x4KfQf2ULtO_aOk_M2RMCimoz8jgcW0RZd-f34KDAs,2365
|
|
@@ -130,7 +132,7 @@ mistralai/_hooks/deprecation_warning.py,sha256=eyEOf7-o9uqqNWJnufD2RXp3dYrGV4in9
|
|
|
130
132
|
mistralai/_hooks/registration.py,sha256=ML0W-XbE4WYdJ4eGks_XxF2aLCJTaIWjQATFGzFwvyU,861
|
|
131
133
|
mistralai/_hooks/sdkhooks.py,sha256=s-orhdvnV89TmI3QiPC2LWQtYeM9RrsG1CTll-fYZmQ,2559
|
|
132
134
|
mistralai/_hooks/types.py,sha256=vUkTVk_TSaK10aEj368KYWvnd4T5EsawixMcTro_UHc,2570
|
|
133
|
-
mistralai/_version.py,sha256=
|
|
135
|
+
mistralai/_version.py,sha256=KV0tc-yYGryIwSXq3zT0H9027LGViNQCO6UCgxbF6Cs,313
|
|
134
136
|
mistralai/agents.py,sha256=62QnyHeUPmWtdBNCrq8MQEwpO2CtQMRa5_8VCbWU588,28795
|
|
135
137
|
mistralai/async_client.py,sha256=KUdYxIIqoD6L7vB0EGwUR6lQ0NK5iCTHjnLVR9CVcJY,355
|
|
136
138
|
mistralai/basesdk.py,sha256=MQIeNInArcIcDYgSy67EDf77ykys9JwjTlnboqdpEJ8,11273
|
|
@@ -145,7 +147,7 @@ mistralai/fine_tuning.py,sha256=UENQqfE054VEsAYxdruV-TBLFIFfO-joXNznH08GUvE,477
|
|
|
145
147
|
mistralai/httpclient.py,sha256=S_ItzEchFX-znIdHD6i5-a91H0Dn5QxpT0KhucdHBbI,2595
|
|
146
148
|
mistralai/jobs.py,sha256=0XLeyOblCdEIq6tw3zkZQG1GtdxidRNNnnpfxpH0g5E,39538
|
|
147
149
|
mistralai/mistral_jobs.py,sha256=M3N-A7dYNY_Zobo1xhZtq3EK0j1I8Ny7hnoYmlajeMM,26949
|
|
148
|
-
mistralai/models/__init__.py,sha256=
|
|
150
|
+
mistralai/models/__init__.py,sha256=vfjE67SVD4F9xXx0VTGlDvOdm_96tAKXk2xD9Ew5wl4,21441
|
|
149
151
|
mistralai/models/agentscompletionrequest.py,sha256=4enNzxh-QKJ53FNfCZbmS_2jPwEBC4Ys13eH0WkggH4,7270
|
|
150
152
|
mistralai/models/agentscompletionstreamrequest.py,sha256=F_SM-vg3oi_kGmSIf9EKpRt3rhoc4cdnJa634RnyOGc,6691
|
|
151
153
|
mistralai/models/apiendpoint.py,sha256=9gAlIzzFW9XhYtsKY-wBwjjDslwl-XYQTUSBT-GuEGs,249
|
|
@@ -169,7 +171,7 @@ mistralai/models/classificationresponse.py,sha256=TeBV7mH0nvLswPdLhv4ZaDTsXvuVYJ
|
|
|
169
171
|
mistralai/models/completionchunk.py,sha256=Cdq-FBWa1oBhrxapoOAj8qr6xmkeIPsfPQSbjeK6NLY,871
|
|
170
172
|
mistralai/models/completionevent.py,sha256=rFc5dJBRnNOzspI95Jhkjd9WyM476u48cN0T1Vh-Cxw,399
|
|
171
173
|
mistralai/models/completionresponsestreamchoice.py,sha256=gw5-_iOyznuimumDtBV65E3zwUW0KH1OHP55dGCAsAA,1927
|
|
172
|
-
mistralai/models/contentchunk.py,sha256=
|
|
174
|
+
mistralai/models/contentchunk.py,sha256=DW2GUZBQL_W4eewKfz9ZlCymQlDqqoDb0VRabGit00w,815
|
|
173
175
|
mistralai/models/delete_model_v1_models_model_id_deleteop.py,sha256=lnVRFX-G0jkn1dCFC89sXY2Pj_w4QfMDeF1tPjS4hWE,602
|
|
174
176
|
mistralai/models/deletefileout.py,sha256=s3a-H2RgFQ9HX0kYSmP6GwmwE1jghz7dBj-3G0NBVSY,587
|
|
175
177
|
mistralai/models/deletemodelout.py,sha256=W_crO0WtksoKUgq5s9Yh8zS8RxSuyKYQCBt1i8vB1sE,693
|
|
@@ -221,6 +223,7 @@ mistralai/models/listfilesout.py,sha256=tW2fNabLKcftc5kytkjwVaChlOzWRL4FKtNzDak9
|
|
|
221
223
|
mistralai/models/metricout.py,sha256=dXQMMU4Nk6-Zr06Jx1TWilFi6cOwiVLjSanCFn0cPxo,2034
|
|
222
224
|
mistralai/models/modelcapabilities.py,sha256=No-Dl09zT1sG4MxsWnx4s8Yo1tUeMQ7k-HR_iQFIMFc,703
|
|
223
225
|
mistralai/models/modellist.py,sha256=uNR7bXKdsJ7IBAqTOMP2gurqIRUrGujmxf5pYwdp7wA,942
|
|
226
|
+
mistralai/models/referencechunk.py,sha256=Xmvi0lJBPPFQSyphUcQLqMAKzhJhAxRdjKvrHoKQsJo,763
|
|
224
227
|
mistralai/models/responseformat.py,sha256=C_zO6X4cbT1qSS_q9Qxq64AmtfK10i9tqEz_39ZcFzo,1045
|
|
225
228
|
mistralai/models/responseformats.py,sha256=oeXHoVUoZrZwrz-0cm-rHj5sHygv9MpeqgdummGa8ww,488
|
|
226
229
|
mistralai/models/retrieve_model_v1_models_model_id_getop.py,sha256=tvwm2ldwj-_Wo3dB_YLZF5zWHnLcwH768nvjgImoLRA,1270
|
|
@@ -235,7 +238,7 @@ mistralai/models/tool.py,sha256=qLY0XE3uk79v3RsJqVpA81A0K9OWtmX6rwVeKal5ARk,681
|
|
|
235
238
|
mistralai/models/toolcall.py,sha256=DYYZ4KEwwJWrN0zLJtXkCd35es8f-LVzE7kVfFe_ZkE,766
|
|
236
239
|
mistralai/models/toolchoice.py,sha256=dGeb5koPp9eqHQuG1u-kP7T5Od6-cPL2rEe06-dqzcs,1021
|
|
237
240
|
mistralai/models/toolchoiceenum.py,sha256=Ca4ileCwuOjfPzIXLRIxT3RkE5zR7oqV6nXU-UjW0w0,197
|
|
238
|
-
mistralai/models/toolmessage.py,sha256=
|
|
241
|
+
mistralai/models/toolmessage.py,sha256=1M9EHLCikokhY-oxytfWSlOHNWgySN75_uYLzd4TkOA,1934
|
|
239
242
|
mistralai/models/tooltypes.py,sha256=NcvRsZA_ORf4WY_gn6WjgX6eEXmR2faVG3Q1sLlzdG8,244
|
|
240
243
|
mistralai/models/trainingfile.py,sha256=IlwKP2GL8gL0VHVJ_zUDV-Q0F7obdLzMMRDDJatSjwo,400
|
|
241
244
|
mistralai/models/trainingparameters.py,sha256=GA7OFskn6BxHs_N6YIv0s6e1j_xmqrwcuCioqIcPZK8,2298
|
|
@@ -251,7 +254,7 @@ mistralai/models/wandbintegrationout.py,sha256=C0HpS8jJGnACs7eWnuIq0qJEroIUAbjkv
|
|
|
251
254
|
mistralai/models_.py,sha256=Kj5U6ODBgKiKs93Miaq11dlV3MDvaz--nI8ucvZVark,39797
|
|
252
255
|
mistralai/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
253
256
|
mistralai/sdk.py,sha256=JBssVtpwLDcni_Q-IHNs62Zz8-ZxFldiOj3e42-Cb8k,5007
|
|
254
|
-
mistralai/sdkconfiguration.py,sha256=
|
|
257
|
+
mistralai/sdkconfiguration.py,sha256=1SxtLQRzajYf2sudPFuTLOnLT017dgYs485c4-haS1g,1688
|
|
255
258
|
mistralai/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
256
259
|
mistralai/types/basemodel.py,sha256=PexI39iKiOkIlobB8Ueo0yn8PLHp6_wb-WO-zelNDZY,1170
|
|
257
260
|
mistralai/utils/__init__.py,sha256=8npwwHS-7zjVrbkzBGO-Uk4GkjC240PCleMbgPK1Axs,2418
|
|
@@ -270,7 +273,7 @@ mistralai/utils/serializers.py,sha256=BSJT7kBOkNBFyP7KREyMoe14JGbgijD1M6AXFMbdmc
|
|
|
270
273
|
mistralai/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
271
274
|
mistralai/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs,3428
|
|
272
275
|
mistralai/version.py,sha256=iosXhlXclBwBqlADFKEilxAC2wWKbtuBKi87AmPi7s8,196
|
|
273
|
-
mistralai-1.2.
|
|
274
|
-
mistralai-1.2.
|
|
275
|
-
mistralai-1.2.
|
|
276
|
-
mistralai-1.2.
|
|
276
|
+
mistralai-1.2.3.dist-info/LICENSE,sha256=rUtQ_9GD0OyLPlb-2uWVdfE87hzudMRmsW-tS-0DK-0,11340
|
|
277
|
+
mistralai-1.2.3.dist-info/METADATA,sha256=PT4SlCLB25Fide872-s7TjjUAcgWQEUgL1svBhYooWE,26299
|
|
278
|
+
mistralai-1.2.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
279
|
+
mistralai-1.2.3.dist-info/RECORD,,
|
mistralai_azure/_version.py
CHANGED
|
@@ -54,6 +54,7 @@ from .functioncall import (
|
|
|
54
54
|
)
|
|
55
55
|
from .functionname import FunctionName, FunctionNameTypedDict
|
|
56
56
|
from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
|
|
57
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkType, ReferenceChunkTypedDict
|
|
57
58
|
from .responseformat import ResponseFormat, ResponseFormatTypedDict
|
|
58
59
|
from .responseformats import ResponseFormats
|
|
59
60
|
from .sdkerror import SDKError
|
|
@@ -70,7 +71,13 @@ from .tool import Tool, ToolTypedDict
|
|
|
70
71
|
from .toolcall import ToolCall, ToolCallTypedDict
|
|
71
72
|
from .toolchoice import ToolChoice, ToolChoiceTypedDict
|
|
72
73
|
from .toolchoiceenum import ToolChoiceEnum
|
|
73
|
-
from .toolmessage import
|
|
74
|
+
from .toolmessage import (
|
|
75
|
+
ToolMessage,
|
|
76
|
+
ToolMessageContent,
|
|
77
|
+
ToolMessageContentTypedDict,
|
|
78
|
+
ToolMessageRole,
|
|
79
|
+
ToolMessageTypedDict,
|
|
80
|
+
)
|
|
74
81
|
from .tooltypes import ToolTypes
|
|
75
82
|
from .usageinfo import UsageInfo, UsageInfoTypedDict
|
|
76
83
|
from .usermessage import (
|
|
@@ -137,6 +144,9 @@ __all__ = [
|
|
|
137
144
|
"LocTypedDict",
|
|
138
145
|
"Messages",
|
|
139
146
|
"MessagesTypedDict",
|
|
147
|
+
"ReferenceChunk",
|
|
148
|
+
"ReferenceChunkType",
|
|
149
|
+
"ReferenceChunkTypedDict",
|
|
140
150
|
"ResponseFormat",
|
|
141
151
|
"ResponseFormatTypedDict",
|
|
142
152
|
"ResponseFormats",
|
|
@@ -159,6 +169,8 @@ __all__ = [
|
|
|
159
169
|
"ToolChoiceEnum",
|
|
160
170
|
"ToolChoiceTypedDict",
|
|
161
171
|
"ToolMessage",
|
|
172
|
+
"ToolMessageContent",
|
|
173
|
+
"ToolMessageContentTypedDict",
|
|
162
174
|
"ToolMessageRole",
|
|
163
175
|
"ToolMessageTypedDict",
|
|
164
176
|
"ToolTypedDict",
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict
|
|
4
5
|
from .textchunk import TextChunk, TextChunkTypedDict
|
|
6
|
+
from mistralai_azure.utils import get_discriminator
|
|
7
|
+
from pydantic import Discriminator, Tag
|
|
8
|
+
from typing import Union
|
|
9
|
+
from typing_extensions import Annotated
|
|
5
10
|
|
|
6
11
|
|
|
7
|
-
ContentChunkTypedDict = TextChunkTypedDict
|
|
12
|
+
ContentChunkTypedDict = Union[TextChunkTypedDict, ReferenceChunkTypedDict]
|
|
8
13
|
|
|
9
14
|
|
|
10
|
-
ContentChunk =
|
|
15
|
+
ContentChunk = Annotated[
|
|
16
|
+
Union[
|
|
17
|
+
Annotated[TextChunk, Tag("text")], Annotated[ReferenceChunk, Tag("reference")]
|
|
18
|
+
],
|
|
19
|
+
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
20
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai_azure.types import BaseModel
|
|
5
|
+
from mistralai_azure.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import List, Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
ReferenceChunkType = Literal["reference"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ReferenceChunkTypedDict(TypedDict):
|
|
16
|
+
reference_ids: List[int]
|
|
17
|
+
type: ReferenceChunkType
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ReferenceChunk(BaseModel):
|
|
21
|
+
reference_ids: List[int]
|
|
22
|
+
|
|
23
|
+
TYPE: Annotated[
|
|
24
|
+
Annotated[
|
|
25
|
+
Optional[ReferenceChunkType], AfterValidator(validate_const("reference"))
|
|
26
|
+
],
|
|
27
|
+
pydantic.Field(alias="type"),
|
|
28
|
+
] = "reference"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .contentchunk import ContentChunk, ContentChunkTypedDict
|
|
4
5
|
from mistralai_azure.types import (
|
|
5
6
|
BaseModel,
|
|
6
7
|
Nullable,
|
|
@@ -9,22 +10,28 @@ from mistralai_azure.types import (
|
|
|
9
10
|
UNSET_SENTINEL,
|
|
10
11
|
)
|
|
11
12
|
from pydantic import model_serializer
|
|
12
|
-
from typing import Literal, Optional
|
|
13
|
+
from typing import List, Literal, Optional, Union
|
|
13
14
|
from typing_extensions import NotRequired, TypedDict
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
ToolMessageContentTypedDict = Union[str, List[ContentChunkTypedDict]]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
ToolMessageContent = Union[str, List[ContentChunk]]
|
|
21
|
+
|
|
22
|
+
|
|
16
23
|
ToolMessageRole = Literal["tool"]
|
|
17
24
|
|
|
18
25
|
|
|
19
26
|
class ToolMessageTypedDict(TypedDict):
|
|
20
|
-
content:
|
|
27
|
+
content: Nullable[ToolMessageContentTypedDict]
|
|
21
28
|
tool_call_id: NotRequired[Nullable[str]]
|
|
22
29
|
name: NotRequired[Nullable[str]]
|
|
23
30
|
role: NotRequired[ToolMessageRole]
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class ToolMessage(BaseModel):
|
|
27
|
-
content:
|
|
34
|
+
content: Nullable[ToolMessageContent]
|
|
28
35
|
|
|
29
36
|
tool_call_id: OptionalNullable[str] = UNSET
|
|
30
37
|
|
|
@@ -35,7 +42,7 @@ class ToolMessage(BaseModel):
|
|
|
35
42
|
@model_serializer(mode="wrap")
|
|
36
43
|
def serialize_model(self, handler):
|
|
37
44
|
optional_fields = ["tool_call_id", "name", "role"]
|
|
38
|
-
nullable_fields = ["tool_call_id", "name"]
|
|
45
|
+
nullable_fields = ["content", "tool_call_id", "name"]
|
|
39
46
|
null_default_fields = []
|
|
40
47
|
|
|
41
48
|
serialized = handler(self)
|
|
@@ -28,9 +28,9 @@ class SDKConfiguration:
|
|
|
28
28
|
server: Optional[str] = ""
|
|
29
29
|
language: str = "python"
|
|
30
30
|
openapi_doc_version: str = "0.0.2"
|
|
31
|
-
sdk_version: str = "1.2.
|
|
32
|
-
gen_version: str = "2.
|
|
33
|
-
user_agent: str = "speakeasy-sdk/python 1.2.
|
|
31
|
+
sdk_version: str = "1.2.3"
|
|
32
|
+
gen_version: str = "2.460.1"
|
|
33
|
+
user_agent: str = "speakeasy-sdk/python 1.2.3 2.460.1 0.0.2 mistralai_azure"
|
|
34
34
|
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
|
|
35
35
|
timeout_ms: Optional[int] = None
|
|
36
36
|
|
mistralai_gcp/_version.py
CHANGED
mistralai_gcp/models/__init__.py
CHANGED
|
@@ -67,6 +67,7 @@ from .functioncall import (
|
|
|
67
67
|
)
|
|
68
68
|
from .functionname import FunctionName, FunctionNameTypedDict
|
|
69
69
|
from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
|
|
70
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkType, ReferenceChunkTypedDict
|
|
70
71
|
from .responseformat import ResponseFormat, ResponseFormatTypedDict
|
|
71
72
|
from .responseformats import ResponseFormats
|
|
72
73
|
from .sdkerror import SDKError
|
|
@@ -83,7 +84,13 @@ from .tool import Tool, ToolTypedDict
|
|
|
83
84
|
from .toolcall import ToolCall, ToolCallTypedDict
|
|
84
85
|
from .toolchoice import ToolChoice, ToolChoiceTypedDict
|
|
85
86
|
from .toolchoiceenum import ToolChoiceEnum
|
|
86
|
-
from .toolmessage import
|
|
87
|
+
from .toolmessage import (
|
|
88
|
+
ToolMessage,
|
|
89
|
+
ToolMessageContent,
|
|
90
|
+
ToolMessageContentTypedDict,
|
|
91
|
+
ToolMessageRole,
|
|
92
|
+
ToolMessageTypedDict,
|
|
93
|
+
)
|
|
87
94
|
from .tooltypes import ToolTypes
|
|
88
95
|
from .usageinfo import UsageInfo, UsageInfoTypedDict
|
|
89
96
|
from .usermessage import (
|
|
@@ -160,6 +167,9 @@ __all__ = [
|
|
|
160
167
|
"LocTypedDict",
|
|
161
168
|
"Messages",
|
|
162
169
|
"MessagesTypedDict",
|
|
170
|
+
"ReferenceChunk",
|
|
171
|
+
"ReferenceChunkType",
|
|
172
|
+
"ReferenceChunkTypedDict",
|
|
163
173
|
"ResponseFormat",
|
|
164
174
|
"ResponseFormatTypedDict",
|
|
165
175
|
"ResponseFormats",
|
|
@@ -182,6 +192,8 @@ __all__ = [
|
|
|
182
192
|
"ToolChoiceEnum",
|
|
183
193
|
"ToolChoiceTypedDict",
|
|
184
194
|
"ToolMessage",
|
|
195
|
+
"ToolMessageContent",
|
|
196
|
+
"ToolMessageContentTypedDict",
|
|
185
197
|
"ToolMessageRole",
|
|
186
198
|
"ToolMessageTypedDict",
|
|
187
199
|
"ToolTypedDict",
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict
|
|
4
5
|
from .textchunk import TextChunk, TextChunkTypedDict
|
|
6
|
+
from mistralai_gcp.utils import get_discriminator
|
|
7
|
+
from pydantic import Discriminator, Tag
|
|
8
|
+
from typing import Union
|
|
9
|
+
from typing_extensions import Annotated
|
|
5
10
|
|
|
6
11
|
|
|
7
|
-
ContentChunkTypedDict = TextChunkTypedDict
|
|
12
|
+
ContentChunkTypedDict = Union[TextChunkTypedDict, ReferenceChunkTypedDict]
|
|
8
13
|
|
|
9
14
|
|
|
10
|
-
ContentChunk =
|
|
15
|
+
ContentChunk = Annotated[
|
|
16
|
+
Union[
|
|
17
|
+
Annotated[TextChunk, Tag("text")], Annotated[ReferenceChunk, Tag("reference")]
|
|
18
|
+
],
|
|
19
|
+
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
20
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from mistralai_gcp.types import BaseModel
|
|
5
|
+
from mistralai_gcp.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from typing import List, Literal, Optional
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
ReferenceChunkType = Literal["reference"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ReferenceChunkTypedDict(TypedDict):
|
|
16
|
+
reference_ids: List[int]
|
|
17
|
+
type: ReferenceChunkType
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ReferenceChunk(BaseModel):
|
|
21
|
+
reference_ids: List[int]
|
|
22
|
+
|
|
23
|
+
TYPE: Annotated[
|
|
24
|
+
Annotated[
|
|
25
|
+
Optional[ReferenceChunkType], AfterValidator(validate_const("reference"))
|
|
26
|
+
],
|
|
27
|
+
pydantic.Field(alias="type"),
|
|
28
|
+
] = "reference"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .contentchunk import ContentChunk, ContentChunkTypedDict
|
|
4
5
|
from mistralai_gcp.types import (
|
|
5
6
|
BaseModel,
|
|
6
7
|
Nullable,
|
|
@@ -9,22 +10,28 @@ from mistralai_gcp.types import (
|
|
|
9
10
|
UNSET_SENTINEL,
|
|
10
11
|
)
|
|
11
12
|
from pydantic import model_serializer
|
|
12
|
-
from typing import Literal, Optional
|
|
13
|
+
from typing import List, Literal, Optional, Union
|
|
13
14
|
from typing_extensions import NotRequired, TypedDict
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
ToolMessageContentTypedDict = Union[str, List[ContentChunkTypedDict]]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
ToolMessageContent = Union[str, List[ContentChunk]]
|
|
21
|
+
|
|
22
|
+
|
|
16
23
|
ToolMessageRole = Literal["tool"]
|
|
17
24
|
|
|
18
25
|
|
|
19
26
|
class ToolMessageTypedDict(TypedDict):
|
|
20
|
-
content:
|
|
27
|
+
content: Nullable[ToolMessageContentTypedDict]
|
|
21
28
|
tool_call_id: NotRequired[Nullable[str]]
|
|
22
29
|
name: NotRequired[Nullable[str]]
|
|
23
30
|
role: NotRequired[ToolMessageRole]
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class ToolMessage(BaseModel):
|
|
27
|
-
content:
|
|
34
|
+
content: Nullable[ToolMessageContent]
|
|
28
35
|
|
|
29
36
|
tool_call_id: OptionalNullable[str] = UNSET
|
|
30
37
|
|
|
@@ -35,7 +42,7 @@ class ToolMessage(BaseModel):
|
|
|
35
42
|
@model_serializer(mode="wrap")
|
|
36
43
|
def serialize_model(self, handler):
|
|
37
44
|
optional_fields = ["tool_call_id", "name", "role"]
|
|
38
|
-
nullable_fields = ["tool_call_id", "name"]
|
|
45
|
+
nullable_fields = ["content", "tool_call_id", "name"]
|
|
39
46
|
null_default_fields = []
|
|
40
47
|
|
|
41
48
|
serialized = handler(self)
|
|
@@ -28,9 +28,9 @@ class SDKConfiguration:
|
|
|
28
28
|
server: Optional[str] = ""
|
|
29
29
|
language: str = "python"
|
|
30
30
|
openapi_doc_version: str = "0.0.2"
|
|
31
|
-
sdk_version: str = "1.2.
|
|
32
|
-
gen_version: str = "2.
|
|
33
|
-
user_agent: str = "speakeasy-sdk/python 1.2.
|
|
31
|
+
sdk_version: str = "1.2.3"
|
|
32
|
+
gen_version: str = "2.460.1"
|
|
33
|
+
user_agent: str = "speakeasy-sdk/python 1.2.3 2.460.1 0.0.2 mistralai-gcp"
|
|
34
34
|
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
|
|
35
35
|
timeout_ms: Optional[int] = None
|
|
36
36
|
|
|
File without changes
|
|
File without changes
|