mistralai 1.2.4__py3-none-any.whl → 1.2.5__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.
@@ -5,12 +5,18 @@ import httpx
5
5
 
6
6
  from .types import BeforeRequestContext, BeforeRequestHook
7
7
 
8
+ PREFIX = "mistral-client-python/"
8
9
 
9
10
  class CustomUserAgentHook(BeforeRequestHook):
10
11
  def before_request(
11
12
  self, hook_ctx: BeforeRequestContext, request: httpx.Request
12
13
  ) -> Union[httpx.Request, Exception]:
14
+ current = request.headers["user-agent"]
15
+ if current.startswith(PREFIX):
16
+ return request
17
+
13
18
  request.headers["user-agent"] = (
14
- "mistral-client-python/" + request.headers["user-agent"].split(" ")[1]
19
+ PREFIX + current.split(" ")[1]
15
20
  )
21
+
16
22
  return request
mistralai/_version.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "mistralai"
6
- __version__: str = "1.2.4"
6
+ __version__: str = "1.2.5"
7
7
 
8
8
  try:
9
9
  if __package__ is not None:
@@ -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.4"
31
+ sdk_version: str = "1.2.5"
32
32
  gen_version: str = "2.470.1"
33
- user_agent: str = "speakeasy-sdk/python 1.2.4 2.470.1 0.0.2 mistralai"
33
+ user_agent: str = "speakeasy-sdk/python 1.2.5 2.470.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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mistralai
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Python Client SDK for the Mistral AI API.
5
5
  Home-page: https://github.com/mistralai/client-python.git
6
6
  Author: Mistral
@@ -1,6 +1,6 @@
1
1
  mistralai_azure/__init__.py,sha256=ybmMeI8Pa2HEQCdADbpyIdm3JWu8AU61HxmDupOlTws,220
2
2
  mistralai_azure/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
3
- mistralai_azure/_hooks/custom_user_agent.py,sha256=1VAY7_oknRQGL8QNO0uCRHg6r7XYlssOMTj3gzyIVyk,538
3
+ mistralai_azure/_hooks/custom_user_agent.py,sha256=CnX-8LjyTyOgDcvurQPK2suWBqwQx5PuTT5BBShBBhk,655
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
@@ -61,7 +61,7 @@ mistralai_azure/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,
61
61
  mistralai_azure/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs,3428
62
62
  mistralai_gcp/__init__.py,sha256=ybmMeI8Pa2HEQCdADbpyIdm3JWu8AU61HxmDupOlTws,220
63
63
  mistralai_gcp/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
64
- mistralai_gcp/_hooks/custom_user_agent.py,sha256=1VAY7_oknRQGL8QNO0uCRHg6r7XYlssOMTj3gzyIVyk,538
64
+ mistralai_gcp/_hooks/custom_user_agent.py,sha256=0m-1JzJxOT42rvRTEuCiFLqbOMriOlsraSrAGaXAbyo,656
65
65
  mistralai_gcp/_hooks/registration.py,sha256=5BN-U92pwP5kUaN7EOso2vWrwZlLvRcU5Coccibqp20,741
66
66
  mistralai_gcp/_hooks/sdkhooks.py,sha256=nr_ACx8Rn5xvTkmZP6_EI-f_0hw8wMyPqPHNvjAWAxI,2563
67
67
  mistralai_gcp/_hooks/types.py,sha256=DJD5-sKZfAj0tKgSU5w0YNuJE_C8PDa5n1V27T_7SmE,2574
@@ -127,12 +127,12 @@ mistralai_gcp/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs
127
127
  py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
128
128
  mistralai/__init__.py,sha256=ybmMeI8Pa2HEQCdADbpyIdm3JWu8AU61HxmDupOlTws,220
129
129
  mistralai/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
130
- mistralai/_hooks/custom_user_agent.py,sha256=Q_bKWa4cqUr7nOybJLIqdR63K3jVzdeXh101nyngFaA,543
130
+ mistralai/_hooks/custom_user_agent.py,sha256=cHfp43RcsNvHusq8WVxWrCS3w-pmzJ8uNuvaMZKdtJ8,661
131
131
  mistralai/_hooks/deprecation_warning.py,sha256=eyEOf7-o9uqqNWJnufD2RXp3dYrGV4in9q76yLC1zog,921
132
132
  mistralai/_hooks/registration.py,sha256=ML0W-XbE4WYdJ4eGks_XxF2aLCJTaIWjQATFGzFwvyU,861
133
133
  mistralai/_hooks/sdkhooks.py,sha256=s-orhdvnV89TmI3QiPC2LWQtYeM9RrsG1CTll-fYZmQ,2559
134
134
  mistralai/_hooks/types.py,sha256=vUkTVk_TSaK10aEj368KYWvnd4T5EsawixMcTro_UHc,2570
135
- mistralai/_version.py,sha256=evo3lX3nZiEzlnnF8oB-_9lRabkSZA8GtU9FCSTjjww,313
135
+ mistralai/_version.py,sha256=Z6Ku1k5tFtQjKqQ54yWSf9xDJ3oDR8RSlCJYM5O5AeM,313
136
136
  mistralai/agents.py,sha256=sAt7cSO2VJGmcUy-EA3Bz9rFB5EYb4tArAO8vLZoXBs,28779
137
137
  mistralai/async_client.py,sha256=KUdYxIIqoD6L7vB0EGwUR6lQ0NK5iCTHjnLVR9CVcJY,355
138
138
  mistralai/basesdk.py,sha256=MQIeNInArcIcDYgSy67EDf77ykys9JwjTlnboqdpEJ8,11273
@@ -255,7 +255,7 @@ mistralai/models/wandbintegrationout.py,sha256=C0HpS8jJGnACs7eWnuIq0qJEroIUAbjkv
255
255
  mistralai/models_.py,sha256=Kj5U6ODBgKiKs93Miaq11dlV3MDvaz--nI8ucvZVark,39797
256
256
  mistralai/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
257
257
  mistralai/sdk.py,sha256=lLJOfh9im-TDBsXX9_qM-JPGXjQOOSBDGOrmlJWaZBY,5444
258
- mistralai/sdkconfiguration.py,sha256=DgRkl_w6gaKdTlhXbXwLenGlNzWaihGuy62Kwv0ozQg,1688
258
+ mistralai/sdkconfiguration.py,sha256=YtOuVTpYMb4eMzCntsEYP18rpx44-YP1TmAIXdkg9xE,1688
259
259
  mistralai/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
260
260
  mistralai/types/basemodel.py,sha256=PexI39iKiOkIlobB8Ueo0yn8PLHp6_wb-WO-zelNDZY,1170
261
261
  mistralai/utils/__init__.py,sha256=8npwwHS-7zjVrbkzBGO-Uk4GkjC240PCleMbgPK1Axs,2418
@@ -274,7 +274,7 @@ mistralai/utils/serializers.py,sha256=BSJT7kBOkNBFyP7KREyMoe14JGbgijD1M6AXFMbdmc
274
274
  mistralai/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
275
275
  mistralai/utils/values.py,sha256=_89YXPTI_BU6SXJBzFR4pIzTCBPQW9tsOTN1jeBBIDs,3428
276
276
  mistralai/version.py,sha256=iosXhlXclBwBqlADFKEilxAC2wWKbtuBKi87AmPi7s8,196
277
- mistralai-1.2.4.dist-info/LICENSE,sha256=rUtQ_9GD0OyLPlb-2uWVdfE87hzudMRmsW-tS-0DK-0,11340
278
- mistralai-1.2.4.dist-info/METADATA,sha256=jyoOgFa2nqCIxRpILeOF4SMJxBKzNC-7tIK7XcGmZUY,27984
279
- mistralai-1.2.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
280
- mistralai-1.2.4.dist-info/RECORD,,
277
+ mistralai-1.2.5.dist-info/LICENSE,sha256=rUtQ_9GD0OyLPlb-2uWVdfE87hzudMRmsW-tS-0DK-0,11340
278
+ mistralai-1.2.5.dist-info/METADATA,sha256=z9bWozmQu9DYvlDWTb3sblBhYUkvSxpd2HSnoqJB-Ko,27984
279
+ mistralai-1.2.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
280
+ mistralai-1.2.5.dist-info/RECORD,,
@@ -5,12 +5,18 @@ import httpx
5
5
 
6
6
  from .types import BeforeRequestContext, BeforeRequestHook
7
7
 
8
+ PREFIX = "mistral-client-python/"
8
9
 
9
10
  class CustomUserAgentHook(BeforeRequestHook):
10
11
  def before_request(
11
12
  self, hook_ctx: BeforeRequestContext, request: httpx.Request
12
13
  ) -> Union[httpx.Request, Exception]:
14
+ current = request.headers["user-agent"]
15
+ if current.startswith(PREFIX):
16
+ return request
17
+
13
18
  request.headers["user-agent"] = (
14
- "mistral-client-python/" + request.headers["user-agent"].split(" ")[1]
19
+ PREFIX + current.split(" ")[1]
15
20
  )
16
- return request
21
+
22
+ return request
@@ -5,12 +5,18 @@ import httpx
5
5
 
6
6
  from .types import BeforeRequestContext, BeforeRequestHook
7
7
 
8
+ PREFIX = "mistral-client-python/"
8
9
 
9
10
  class CustomUserAgentHook(BeforeRequestHook):
10
11
  def before_request(
11
12
  self, hook_ctx: BeforeRequestContext, request: httpx.Request
12
13
  ) -> Union[httpx.Request, Exception]:
14
+ current = request.headers["user-agent"]
15
+ if current.startswith(PREFIX):
16
+ return request
17
+
13
18
  request.headers["user-agent"] = (
14
- "mistral-client-python/" + request.headers["user-agent"].split(" ")[1]
19
+ PREFIX + current.split(" ")[1]
15
20
  )
21
+
16
22
  return request