mistralai 1.0.0rc2__py3-none-any.whl → 1.0.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.
Files changed (87) hide show
  1. mistralai/agents.py +33 -33
  2. mistralai/chat.py +4 -4
  3. mistralai/client.py +1 -1
  4. mistralai/jobs.py +24 -34
  5. mistralai/models/__init__.py +22 -22
  6. mistralai/models/agentscompletionrequest.py +14 -14
  7. mistralai/models/agentscompletionstreamrequest.py +41 -39
  8. mistralai/models/archiveftmodelout.py +4 -2
  9. mistralai/models/chatcompletionchoice.py +3 -4
  10. mistralai/models/chatcompletionrequest.py +16 -16
  11. mistralai/models/chatcompletionstreamrequest.py +16 -16
  12. mistralai/models/delete_model_v1_models_model_id_deleteop.py +2 -0
  13. mistralai/models/deltamessage.py +6 -6
  14. mistralai/models/detailedjobout.py +19 -5
  15. mistralai/models/embeddingrequest.py +8 -8
  16. mistralai/models/files_api_routes_upload_fileop.py +7 -4
  17. mistralai/models/fileschema.py +8 -3
  18. mistralai/models/fimcompletionrequest.py +8 -8
  19. mistralai/models/fimcompletionstreamrequest.py +8 -8
  20. mistralai/models/ftmodelout.py +4 -2
  21. mistralai/models/functioncall.py +9 -3
  22. mistralai/models/githubrepositoryin.py +4 -2
  23. mistralai/models/githubrepositoryout.py +4 -2
  24. mistralai/models/jobin.py +16 -4
  25. mistralai/models/jobout.py +20 -5
  26. mistralai/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py +2 -0
  27. mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +1 -54
  28. mistralai/models/jobs_api_routes_fine_tuning_unarchive_fine_tuned_modelop.py +2 -0
  29. mistralai/models/jobs_api_routes_fine_tuning_update_fine_tuned_modelop.py +2 -0
  30. mistralai/models/jobsout.py +4 -2
  31. mistralai/models/legacyjobmetadataout.py +4 -2
  32. mistralai/models/retrieve_model_v1_models_model_id_getop.py +2 -0
  33. mistralai/models/retrievefileout.py +8 -3
  34. mistralai/models/systemmessage.py +6 -6
  35. mistralai/models/tool.py +9 -5
  36. mistralai/models/toolcall.py +8 -4
  37. mistralai/models/trainingparameters.py +6 -2
  38. mistralai/models/trainingparametersin.py +10 -2
  39. mistralai/models/unarchiveftmodelout.py +4 -2
  40. mistralai/models/uploadfileout.py +8 -3
  41. mistralai/models/usermessage.py +6 -6
  42. mistralai/models/validationerror.py +6 -6
  43. mistralai/models/wandbintegration.py +4 -2
  44. mistralai/models/wandbintegrationout.py +4 -2
  45. mistralai/models_.py +10 -10
  46. mistralai/sdk.py +2 -2
  47. mistralai/sdkconfiguration.py +3 -3
  48. mistralai/utils/__init__.py +2 -2
  49. mistralai/utils/forms.py +10 -9
  50. mistralai/utils/headers.py +8 -8
  51. mistralai/utils/logger.py +8 -0
  52. mistralai/utils/queryparams.py +16 -14
  53. mistralai/utils/serializers.py +17 -8
  54. mistralai/utils/url.py +13 -8
  55. mistralai/utils/values.py +6 -0
  56. mistralai/version.py +7 -0
  57. {mistralai-1.0.0rc2.dist-info → mistralai-1.0.2.dist-info}/METADATA +40 -18
  58. {mistralai-1.0.0rc2.dist-info → mistralai-1.0.2.dist-info}/RECORD +87 -86
  59. mistralai_azure/models/__init__.py +4 -4
  60. mistralai_azure/models/chatcompletionchoice.py +3 -4
  61. mistralai_azure/models/chatcompletionrequest.py +14 -14
  62. mistralai_azure/models/chatcompletionstreamrequest.py +14 -14
  63. mistralai_azure/models/deltamessage.py +6 -6
  64. mistralai_azure/models/functioncall.py +9 -3
  65. mistralai_azure/models/systemmessage.py +6 -6
  66. mistralai_azure/models/tool.py +9 -5
  67. mistralai_azure/models/toolcall.py +8 -4
  68. mistralai_azure/models/usermessage.py +6 -6
  69. mistralai_azure/models/validationerror.py +6 -6
  70. mistralai_azure/sdkconfiguration.py +3 -3
  71. mistralai_gcp/chat.py +4 -4
  72. mistralai_gcp/models/__init__.py +4 -4
  73. mistralai_gcp/models/chatcompletionchoice.py +3 -4
  74. mistralai_gcp/models/chatcompletionrequest.py +16 -16
  75. mistralai_gcp/models/chatcompletionstreamrequest.py +16 -16
  76. mistralai_gcp/models/deltamessage.py +6 -6
  77. mistralai_gcp/models/fimcompletionrequest.py +8 -8
  78. mistralai_gcp/models/fimcompletionstreamrequest.py +8 -8
  79. mistralai_gcp/models/functioncall.py +9 -3
  80. mistralai_gcp/models/systemmessage.py +6 -6
  81. mistralai_gcp/models/tool.py +9 -5
  82. mistralai_gcp/models/toolcall.py +8 -4
  83. mistralai_gcp/models/usermessage.py +6 -6
  84. mistralai_gcp/models/validationerror.py +6 -6
  85. mistralai_gcp/sdkconfiguration.py +3 -3
  86. {mistralai-1.0.0rc2.dist-info → mistralai-1.0.2.dist-info}/LICENSE +0 -0
  87. {mistralai-1.0.0rc2.dist-info → mistralai-1.0.2.dist-info}/WHEEL +0 -0
mistralai/utils/forms.py CHANGED
@@ -17,7 +17,7 @@ from .metadata import (
17
17
  MultipartFormMetadata,
18
18
  find_field_metadata,
19
19
  )
20
- from .values import _val_to_string
20
+ from .values import _is_set, _val_to_string
21
21
 
22
22
 
23
23
  def _populate_form(
@@ -27,7 +27,7 @@ def _populate_form(
27
27
  delimiter: str,
28
28
  form: Dict[str, List[str]],
29
29
  ):
30
- if obj is None:
30
+ if not _is_set(obj):
31
31
  return form
32
32
 
33
33
  if isinstance(obj, BaseModel):
@@ -41,7 +41,7 @@ def _populate_form(
41
41
  continue
42
42
 
43
43
  val = getattr(obj, name)
44
- if val is None:
44
+ if not _is_set(val):
45
45
  continue
46
46
 
47
47
  if explode:
@@ -54,7 +54,7 @@ def _populate_form(
54
54
  elif isinstance(obj, Dict):
55
55
  items = []
56
56
  for key, value in obj.items():
57
- if value is None:
57
+ if not _is_set(value):
58
58
  continue
59
59
 
60
60
  if explode:
@@ -68,7 +68,7 @@ def _populate_form(
68
68
  items = []
69
69
 
70
70
  for value in obj:
71
- if value is None:
71
+ if not _is_set(value):
72
72
  continue
73
73
 
74
74
  if explode:
@@ -102,7 +102,7 @@ def serialize_multipart_form(
102
102
  field = request_fields[name]
103
103
 
104
104
  val = getattr(request, name)
105
- if val is None:
105
+ if not _is_set(val):
106
106
  continue
107
107
 
108
108
  field_metadata = find_field_metadata(field, MultipartFormMetadata)
@@ -156,7 +156,7 @@ def serialize_multipart_form(
156
156
  values = []
157
157
 
158
158
  for value in val:
159
- if value is None:
159
+ if not _is_set(value):
160
160
  continue
161
161
  values.append(_val_to_string(value))
162
162
 
@@ -176,7 +176,7 @@ def serialize_form_data(data: Any) -> Dict[str, Any]:
176
176
  field = data_fields[name]
177
177
 
178
178
  val = getattr(data, name)
179
- if val is None:
179
+ if not _is_set(val):
180
180
  continue
181
181
 
182
182
  metadata = find_field_metadata(field, FormMetadata)
@@ -200,7 +200,8 @@ def serialize_form_data(data: Any) -> Dict[str, Any]:
200
200
  raise ValueError(f"Invalid form style for field {name}")
201
201
  elif isinstance(data, Dict):
202
202
  for key, value in data.items():
203
- form[key] = [_val_to_string(value)]
203
+ if _is_set(value):
204
+ form[key] = [_val_to_string(value)]
204
205
  else:
205
206
  raise TypeError(f"Invalid request body type {type(data)} for form data")
206
207
 
@@ -15,16 +15,16 @@ from .metadata import (
15
15
  find_field_metadata,
16
16
  )
17
17
 
18
- from .values import _populate_from_globals, _val_to_string
18
+ from .values import _is_set, _populate_from_globals, _val_to_string
19
19
 
20
20
 
21
21
  def get_headers(headers_params: Any, gbls: Optional[Any] = None) -> Dict[str, str]:
22
22
  headers: Dict[str, str] = {}
23
23
 
24
24
  globals_already_populated = []
25
- if headers_params is not None:
25
+ if _is_set(headers_params):
26
26
  globals_already_populated = _populate_headers(headers_params, gbls, headers, [])
27
- if gbls is not None:
27
+ if _is_set(gbls):
28
28
  _populate_headers(gbls, None, headers, globals_already_populated)
29
29
 
30
30
  return headers
@@ -67,7 +67,7 @@ def _populate_headers(
67
67
 
68
68
 
69
69
  def _serialize_header(explode: bool, obj: Any) -> str:
70
- if obj is None:
70
+ if not _is_set(obj):
71
71
  return ""
72
72
 
73
73
  if isinstance(obj, BaseModel):
@@ -83,7 +83,7 @@ def _serialize_header(explode: bool, obj: Any) -> str:
83
83
  f_name = obj_field.alias if obj_field.alias is not None else name
84
84
 
85
85
  val = getattr(obj, name)
86
- if val is None:
86
+ if not _is_set(val):
87
87
  continue
88
88
 
89
89
  if explode:
@@ -98,7 +98,7 @@ def _serialize_header(explode: bool, obj: Any) -> str:
98
98
  items = []
99
99
 
100
100
  for key, value in obj.items():
101
- if value is None:
101
+ if not _is_set(value):
102
102
  continue
103
103
 
104
104
  if explode:
@@ -113,14 +113,14 @@ def _serialize_header(explode: bool, obj: Any) -> str:
113
113
  items = []
114
114
 
115
115
  for value in obj:
116
- if value is None:
116
+ if not _is_set(value):
117
117
  continue
118
118
 
119
119
  items.append(_val_to_string(value))
120
120
 
121
121
  if len(items) > 0:
122
122
  return ",".join(items)
123
- else:
123
+ elif _is_set(obj):
124
124
  return f"{_val_to_string(obj)}"
125
125
 
126
126
  return ""
mistralai/utils/logger.py CHANGED
@@ -1,6 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  import httpx
4
+ import logging
5
+ import os
4
6
  from typing import Any, Protocol
5
7
 
6
8
  class Logger(Protocol):
@@ -14,3 +16,9 @@ class NoOpLogger:
14
16
  def get_body_content(req: httpx.Request) -> str:
15
17
  return "<streaming body>" if not hasattr(req, "_content") else str(req.content)
16
18
 
19
+ def get_default_logger() -> Logger:
20
+ if os.getenv("MISTRAL_DEBUG"):
21
+ logging.basicConfig(level=logging.DEBUG)
22
+ return logging.getLogger("mistralai")
23
+ return NoOpLogger()
24
+
@@ -15,7 +15,12 @@ from .metadata import (
15
15
  QueryParamMetadata,
16
16
  find_field_metadata,
17
17
  )
18
- from .values import _get_serialized_params, _populate_from_globals, _val_to_string
18
+ from .values import (
19
+ _get_serialized_params,
20
+ _is_set,
21
+ _populate_from_globals,
22
+ _val_to_string,
23
+ )
19
24
  from .forms import _populate_form
20
25
 
21
26
 
@@ -26,7 +31,7 @@ def get_query_params(
26
31
  params: Dict[str, List[str]] = {}
27
32
 
28
33
  globals_already_populated = _populate_query_params(query_params, gbls, params, [])
29
- if gbls is not None:
34
+ if _is_set(gbls):
30
35
  _populate_query_params(gbls, None, params, globals_already_populated)
31
36
 
32
37
  return params
@@ -55,7 +60,7 @@ def _populate_query_params(
55
60
  if not metadata:
56
61
  continue
57
62
 
58
- value = getattr(query_params, name) if query_params is not None else None
63
+ value = getattr(query_params, name) if _is_set(query_params) else None
59
64
 
60
65
  value, global_found = _populate_from_globals(
61
66
  name, value, QueryParamMetadata, gbls
@@ -99,7 +104,7 @@ def _populate_deep_object_query_params(
99
104
  obj: Any,
100
105
  params: Dict[str, List[str]],
101
106
  ):
102
- if obj is None:
107
+ if not _is_set(obj):
103
108
  return
104
109
 
105
110
  if isinstance(obj, BaseModel):
@@ -113,10 +118,7 @@ def _populate_deep_object_query_params_basemodel(
113
118
  obj: Any,
114
119
  params: Dict[str, List[str]],
115
120
  ):
116
- if obj is None:
117
- return
118
-
119
- if not isinstance(obj, BaseModel):
121
+ if not _is_set(obj) or not isinstance(obj, BaseModel):
120
122
  return
121
123
 
122
124
  obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields
@@ -128,11 +130,11 @@ def _populate_deep_object_query_params_basemodel(
128
130
  params_key = f"{prior_params_key}[{f_name}]"
129
131
 
130
132
  obj_param_metadata = find_field_metadata(obj_field, QueryParamMetadata)
131
- if obj_param_metadata is None:
133
+ if not _is_set(obj_param_metadata):
132
134
  continue
133
135
 
134
136
  obj_val = getattr(obj, name)
135
- if obj_val is None:
137
+ if not _is_set(obj_val):
136
138
  continue
137
139
 
138
140
  if isinstance(obj_val, BaseModel):
@@ -150,11 +152,11 @@ def _populate_deep_object_query_params_dict(
150
152
  value: Dict,
151
153
  params: Dict[str, List[str]],
152
154
  ):
153
- if value is None:
155
+ if not _is_set(value):
154
156
  return
155
157
 
156
158
  for key, val in value.items():
157
- if val is None:
159
+ if not _is_set(val):
158
160
  continue
159
161
 
160
162
  params_key = f"{prior_params_key}[{key}]"
@@ -174,11 +176,11 @@ def _populate_deep_object_query_params_list(
174
176
  value: List,
175
177
  params: Dict[str, List[str]],
176
178
  ):
177
- if value is None:
179
+ if not _is_set(value):
178
180
  return
179
181
 
180
182
  for val in value:
181
- if val is None:
183
+ if not _is_set(val):
182
184
  continue
183
185
 
184
186
  if params.get(params_key) is None:
@@ -9,13 +9,15 @@ from pydantic import ConfigDict, create_model
9
9
  from pydantic_core import from_json
10
10
  from typing_inspect import is_optional_type
11
11
 
12
- from ..types.basemodel import BaseModel, Nullable, OptionalNullable
12
+ from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset
13
13
 
14
14
 
15
15
  def serialize_decimal(as_str: bool):
16
16
  def serialize(d):
17
17
  if is_optional_type(type(d)) and d is None:
18
18
  return None
19
+ if isinstance(d, Unset):
20
+ return d
19
21
 
20
22
  if not isinstance(d, Decimal):
21
23
  raise ValueError("Expected Decimal object")
@@ -29,7 +31,7 @@ def validate_decimal(d):
29
31
  if d is None:
30
32
  return None
31
33
 
32
- if isinstance(d, Decimal):
34
+ if isinstance(d, (Decimal, Unset)):
33
35
  return d
34
36
 
35
37
  if not isinstance(d, (str, int, float)):
@@ -42,6 +44,8 @@ def serialize_float(as_str: bool):
42
44
  def serialize(f):
43
45
  if is_optional_type(type(f)) and f is None:
44
46
  return None
47
+ if isinstance(f, Unset):
48
+ return f
45
49
 
46
50
  if not isinstance(f, float):
47
51
  raise ValueError("Expected float")
@@ -55,7 +59,7 @@ def validate_float(f):
55
59
  if f is None:
56
60
  return None
57
61
 
58
- if isinstance(f, float):
62
+ if isinstance(f, (float, Unset)):
59
63
  return f
60
64
 
61
65
  if not isinstance(f, str):
@@ -65,14 +69,16 @@ def validate_float(f):
65
69
 
66
70
 
67
71
  def serialize_int(as_str: bool):
68
- def serialize(b):
69
- if is_optional_type(type(b)) and b is None:
72
+ def serialize(i):
73
+ if is_optional_type(type(i)) and i is None:
70
74
  return None
75
+ if isinstance(i, Unset):
76
+ return i
71
77
 
72
- if not isinstance(b, int):
78
+ if not isinstance(i, int):
73
79
  raise ValueError("Expected int")
74
80
 
75
- return str(b) if as_str else b
81
+ return str(i) if as_str else i
76
82
 
77
83
  return serialize
78
84
 
@@ -81,7 +87,7 @@ def validate_int(b):
81
87
  if b is None:
82
88
  return None
83
89
 
84
- if isinstance(b, int):
90
+ if isinstance(b, (int, Unset)):
85
91
  return b
86
92
 
87
93
  if not isinstance(b, str):
@@ -95,6 +101,9 @@ def validate_open_enum(is_int: bool):
95
101
  if e is None:
96
102
  return None
97
103
 
104
+ if isinstance(e, Unset):
105
+ return e
106
+
98
107
  if is_int:
99
108
  if not isinstance(e, int):
100
109
  raise ValueError("Expected int")
mistralai/utils/url.py CHANGED
@@ -18,7 +18,12 @@ from .metadata import (
18
18
  PathParamMetadata,
19
19
  find_field_metadata,
20
20
  )
21
- from .values import _get_serialized_params, _populate_from_globals, _val_to_string
21
+ from .values import (
22
+ _get_serialized_params,
23
+ _is_set,
24
+ _populate_from_globals,
25
+ _val_to_string,
26
+ )
22
27
 
23
28
 
24
29
  def generate_url(
@@ -32,7 +37,7 @@ def generate_url(
32
37
  globals_already_populated = _populate_path_params(
33
38
  path_params, gbls, path_param_values, []
34
39
  )
35
- if gbls is not None:
40
+ if _is_set(gbls):
36
41
  _populate_path_params(gbls, None, path_param_values, globals_already_populated)
37
42
 
38
43
  for key, value in path_param_values.items():
@@ -64,14 +69,14 @@ def _populate_path_params(
64
69
  if param_metadata is None:
65
70
  continue
66
71
 
67
- param = getattr(path_params, name) if path_params is not None else None
72
+ param = getattr(path_params, name) if _is_set(path_params) else None
68
73
  param, global_found = _populate_from_globals(
69
74
  name, param, PathParamMetadata, gbls
70
75
  )
71
76
  if global_found:
72
77
  globals_already_populated.append(name)
73
78
 
74
- if param is None:
79
+ if not _is_set(param):
75
80
  continue
76
81
 
77
82
  f_name = field.alias if field.alias is not None else name
@@ -87,13 +92,13 @@ def _populate_path_params(
87
92
  if param_metadata.style == "simple":
88
93
  if isinstance(param, List):
89
94
  for pp_val in param:
90
- if pp_val is None:
95
+ if not _is_set(pp_val):
91
96
  continue
92
97
  pp_vals.append(_val_to_string(pp_val))
93
98
  path_param_values[f_name] = ",".join(pp_vals)
94
99
  elif isinstance(param, Dict):
95
100
  for pp_key in param:
96
- if param[pp_key] is None:
101
+ if not _is_set(param[pp_key]):
97
102
  continue
98
103
  if param_metadata.explode:
99
104
  pp_vals.append(f"{pp_key}={_val_to_string(param[pp_key])}")
@@ -116,7 +121,7 @@ def _populate_path_params(
116
121
  )
117
122
 
118
123
  param_field_val = getattr(param, name)
119
- if param_field_val is None:
124
+ if not _is_set(param_field_val):
120
125
  continue
121
126
  if param_metadata.explode:
122
127
  pp_vals.append(
@@ -127,7 +132,7 @@ def _populate_path_params(
127
132
  f"{param_name},{_val_to_string(param_field_val)}"
128
133
  )
129
134
  path_param_values[f_name] = ",".join(pp_vals)
130
- else:
135
+ elif _is_set(param):
131
136
  path_param_values[f_name] = _val_to_string(param)
132
137
 
133
138
  return globals_already_populated
mistralai/utils/values.py CHANGED
@@ -10,6 +10,8 @@ from httpx import Response
10
10
  from pydantic import BaseModel
11
11
  from pydantic.fields import FieldInfo
12
12
 
13
+ from ..types.basemodel import Unset
14
+
13
15
  from .serializers import marshal_json
14
16
 
15
17
  from .metadata import ParamMetadata, find_field_metadata
@@ -126,3 +128,7 @@ def _get_serialized_params(
126
128
  params[field_name] = marshal_json(obj, typ)
127
129
 
128
130
  return params
131
+
132
+
133
+ def _is_set(value: Any) -> bool:
134
+ return value is not None and not isinstance(value, Unset)
mistralai/version.py ADDED
@@ -0,0 +1,7 @@
1
+ from importlib import metadata
2
+
3
+ try:
4
+ __version__ = metadata.version(__package__)
5
+ except metadata.PackageNotFoundError:
6
+ # Case where package metadata is not available.
7
+ __version__ = ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mistralai
3
- Version: 1.0.0rc2
3
+ Version: 1.0.2
4
4
  Summary: Python Client SDK for the Mistral AI API.
5
5
  Author: Mistral
6
6
  Requires-Python: >=3.8,<4.0
@@ -20,15 +20,26 @@ Requires-Dist: requests (>=2.32.3,<3.0.0) ; extra == "gcp"
20
20
  Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
21
21
  Description-Content-Type: text/markdown
22
22
 
23
- # mistralai
24
-
25
- <div align="left">
26
- <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
27
- </div>
23
+ # Mistral Python Client
28
24
 
29
25
  ## Migration warning
30
26
 
31
- This documentation is for Mistralai SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
27
+ This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
28
+
29
+ ## API Key Setup
30
+
31
+ Before you begin, you will need a Mistral AI API key.
32
+
33
+ 1. Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
34
+ 2. Set your Mistral API Key as an environment variable. You only need to do this once.
35
+
36
+ ```bash
37
+ # set Mistral API Key (using zsh for example)
38
+ $ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
39
+
40
+ # reload the environment (or just quit and open a new terminal)
41
+ $ source ~/.zshenv
42
+ ```
32
43
 
33
44
  <!-- Start SDK Installation [installation] -->
34
45
  ## SDK Installation
@@ -200,6 +211,12 @@ asyncio.run(main())
200
211
  ```
201
212
  <!-- End SDK Example Usage [usage] -->
202
213
 
214
+
215
+ ### More examples
216
+
217
+ You can run the examples in the `examples/` directory using `poetry run` or by entering the virtual environment using `poetry shell`.
218
+
219
+
203
220
  ## Providers' SDKs Example Usage
204
221
 
205
222
  ### Azure AI
@@ -329,7 +346,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
329
346
 
330
347
  ### [agents](docs/sdks/agents/README.md)
331
348
 
332
- * [complete](docs/sdks/agents/README.md#complete) - Chat Completion
349
+ * [complete](docs/sdks/agents/README.md#complete) - Agents Completion
333
350
  * [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion
334
351
 
335
352
  ### [embeddings](docs/sdks/embeddings/README.md)
@@ -634,7 +651,7 @@ This SDK supports the following security scheme globally:
634
651
  | -------------------- | -------------------- | -------------------- | -------------------- |
635
652
  | `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
636
653
 
637
- To authenticate with the API the `null` parameter must be set when initializing the SDK client instance. For example:
654
+ To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
638
655
  ```python
639
656
  from mistralai import Mistral
640
657
  import os
@@ -656,8 +673,9 @@ if res is not None:
656
673
  <!-- Start Debugging [debug] -->
657
674
  ## Debugging
658
675
 
659
- To emit debug logs for SDK requests and responses you can pass a logger object directly into your SDK object.
676
+ You can setup your SDK to emit debug logs for SDK requests and responses.
660
677
 
678
+ You can pass your own logger class directly into your SDK.
661
679
  ```python
662
680
  from mistralai import Mistral
663
681
  import logging
@@ -665,22 +683,26 @@ import logging
665
683
  logging.basicConfig(level=logging.DEBUG)
666
684
  s = Mistral(debug_logger=logging.getLogger("mistralai"))
667
685
  ```
686
+
687
+ You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true.
668
688
  <!-- End Debugging [debug] -->
669
689
 
670
- <!-- Placeholder for Future Speakeasy SDK Sections -->
690
+ <!-- Start IDE Support [idesupport] -->
691
+ ## IDE Support
671
692
 
672
- # Development
693
+ ### PyCharm
673
694
 
674
- ## Maturity
695
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
675
696
 
676
- This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
677
- to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
678
- looking for the latest version.
697
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
698
+ <!-- End IDE Support [idesupport] -->
699
+
700
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
701
+
702
+ # Development
679
703
 
680
704
  ## Contributions
681
705
 
682
706
  While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
683
707
  We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
684
708
 
685
- ### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
686
-