camel-ai 0.2.75a5__py3-none-any.whl → 0.2.76__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.

Potentially problematic release.


This version of camel-ai might be problematic. Click here for more details.

Files changed (103) hide show
  1. camel/__init__.py +1 -1
  2. camel/agents/chat_agent.py +1148 -298
  3. camel/agents/mcp_agent.py +30 -27
  4. camel/configs/__init__.py +9 -0
  5. camel/configs/amd_config.py +70 -0
  6. camel/configs/cometapi_config.py +104 -0
  7. camel/configs/nebius_config.py +103 -0
  8. camel/data_collectors/alpaca_collector.py +15 -6
  9. camel/environments/tic_tac_toe.py +1 -1
  10. camel/interpreters/__init__.py +2 -0
  11. camel/interpreters/docker/Dockerfile +3 -12
  12. camel/interpreters/microsandbox_interpreter.py +395 -0
  13. camel/loaders/__init__.py +11 -2
  14. camel/loaders/chunkr_reader.py +9 -0
  15. camel/memories/__init__.py +2 -1
  16. camel/memories/agent_memories.py +3 -1
  17. camel/memories/blocks/chat_history_block.py +21 -3
  18. camel/memories/records.py +88 -8
  19. camel/messages/base.py +127 -34
  20. camel/models/__init__.py +6 -0
  21. camel/models/amd_model.py +101 -0
  22. camel/models/azure_openai_model.py +0 -6
  23. camel/models/base_model.py +30 -0
  24. camel/models/cometapi_model.py +83 -0
  25. camel/models/model_factory.py +6 -0
  26. camel/models/nebius_model.py +83 -0
  27. camel/models/ollama_model.py +3 -3
  28. camel/models/openai_compatible_model.py +0 -6
  29. camel/models/openai_model.py +0 -6
  30. camel/models/zhipuai_model.py +61 -2
  31. camel/parsers/__init__.py +18 -0
  32. camel/parsers/mcp_tool_call_parser.py +176 -0
  33. camel/retrievers/auto_retriever.py +1 -0
  34. camel/runtimes/daytona_runtime.py +11 -12
  35. camel/societies/workforce/prompts.py +131 -50
  36. camel/societies/workforce/single_agent_worker.py +434 -49
  37. camel/societies/workforce/structured_output_handler.py +30 -18
  38. camel/societies/workforce/task_channel.py +163 -27
  39. camel/societies/workforce/utils.py +105 -12
  40. camel/societies/workforce/workforce.py +1357 -314
  41. camel/societies/workforce/workforce_logger.py +24 -5
  42. camel/storages/key_value_storages/json.py +15 -2
  43. camel/storages/object_storages/google_cloud.py +1 -1
  44. camel/storages/vectordb_storages/oceanbase.py +10 -11
  45. camel/storages/vectordb_storages/tidb.py +8 -6
  46. camel/tasks/task.py +4 -3
  47. camel/toolkits/__init__.py +18 -5
  48. camel/toolkits/aci_toolkit.py +45 -0
  49. camel/toolkits/code_execution.py +28 -1
  50. camel/toolkits/context_summarizer_toolkit.py +684 -0
  51. camel/toolkits/dingtalk.py +1135 -0
  52. camel/toolkits/edgeone_pages_mcp_toolkit.py +11 -31
  53. camel/toolkits/{file_write_toolkit.py → file_toolkit.py} +194 -34
  54. camel/toolkits/function_tool.py +6 -1
  55. camel/toolkits/github_toolkit.py +104 -17
  56. camel/toolkits/google_drive_mcp_toolkit.py +12 -31
  57. camel/toolkits/hybrid_browser_toolkit/config_loader.py +12 -0
  58. camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py +79 -2
  59. camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py +95 -59
  60. camel/toolkits/hybrid_browser_toolkit/installer.py +203 -0
  61. camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json +5 -612
  62. camel/toolkits/hybrid_browser_toolkit/ts/package.json +0 -1
  63. camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts +619 -95
  64. camel/toolkits/hybrid_browser_toolkit/ts/src/config-loader.ts +7 -2
  65. camel/toolkits/hybrid_browser_toolkit/ts/src/hybrid-browser-toolkit.ts +115 -219
  66. camel/toolkits/hybrid_browser_toolkit/ts/src/parent-child-filter.ts +226 -0
  67. camel/toolkits/hybrid_browser_toolkit/ts/src/snapshot-parser.ts +219 -0
  68. camel/toolkits/hybrid_browser_toolkit/ts/src/som-screenshot-injected.ts +543 -0
  69. camel/toolkits/hybrid_browser_toolkit/ts/src/types.ts +1 -0
  70. camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js +39 -6
  71. camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +412 -133
  72. camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py +9 -5
  73. camel/toolkits/{openai_image_toolkit.py → image_generation_toolkit.py} +98 -31
  74. camel/toolkits/markitdown_toolkit.py +27 -1
  75. camel/toolkits/math_toolkit.py +64 -10
  76. camel/toolkits/mcp_toolkit.py +348 -348
  77. camel/toolkits/message_integration.py +3 -0
  78. camel/toolkits/minimax_mcp_toolkit.py +195 -0
  79. camel/toolkits/note_taking_toolkit.py +18 -8
  80. camel/toolkits/notion_mcp_toolkit.py +16 -26
  81. camel/toolkits/origene_mcp_toolkit.py +8 -49
  82. camel/toolkits/playwright_mcp_toolkit.py +12 -31
  83. camel/toolkits/resend_toolkit.py +168 -0
  84. camel/toolkits/search_toolkit.py +13 -2
  85. camel/toolkits/slack_toolkit.py +50 -1
  86. camel/toolkits/terminal_toolkit/__init__.py +18 -0
  87. camel/toolkits/terminal_toolkit/terminal_toolkit.py +924 -0
  88. camel/toolkits/terminal_toolkit/utils.py +532 -0
  89. camel/toolkits/vertex_ai_veo_toolkit.py +590 -0
  90. camel/toolkits/video_analysis_toolkit.py +17 -11
  91. camel/toolkits/wechat_official_toolkit.py +483 -0
  92. camel/types/enums.py +155 -1
  93. camel/types/unified_model_type.py +10 -0
  94. camel/utils/commons.py +17 -0
  95. camel/utils/context_utils.py +804 -0
  96. camel/utils/mcp.py +136 -2
  97. camel/utils/token_counting.py +25 -17
  98. {camel_ai-0.2.75a5.dist-info → camel_ai-0.2.76.dist-info}/METADATA +158 -67
  99. {camel_ai-0.2.75a5.dist-info → camel_ai-0.2.76.dist-info}/RECORD +101 -80
  100. camel/loaders/pandas_reader.py +0 -368
  101. camel/toolkits/terminal_toolkit.py +0 -1788
  102. {camel_ai-0.2.75a5.dist-info → camel_ai-0.2.76.dist-info}/WHEEL +0 -0
  103. {camel_ai-0.2.75a5.dist-info → camel_ai-0.2.76.dist-info}/licenses/LICENSE +0 -0
@@ -92,11 +92,12 @@ class HybridBrowserToolkit(BaseToolkit, RegisteredAgentToolkit):
92
92
  user_data_dir: Optional[str] = None,
93
93
  stealth: bool = False,
94
94
  web_agent_model: Optional[BaseModelBackend] = None,
95
- cache_dir: str = "tmp/",
95
+ cache_dir: Optional[str] = None,
96
96
  enabled_tools: Optional[List[str]] = None,
97
97
  browser_log_to_file: bool = False,
98
+ log_dir: Optional[str] = None,
98
99
  session_id: Optional[str] = None,
99
- default_start_url: str = "https://google.com/",
100
+ default_start_url: Optional[str] = None,
100
101
  default_timeout: Optional[int] = None,
101
102
  short_timeout: Optional[int] = None,
102
103
  navigation_timeout: Optional[int] = None,
@@ -144,6 +145,8 @@ class HybridBrowserToolkit(BaseToolkit, RegisteredAgentToolkit):
144
145
  and page loading times.
145
146
  Logs are saved to an auto-generated timestamped file.
146
147
  Defaults to `False`.
148
+ log_dir (Optional[str]): Custom directory path for log files.
149
+ If None, defaults to "browser_log". Defaults to `None`.
147
150
  session_id (Optional[str]): A unique identifier for this browser
148
151
  session. When multiple HybridBrowserToolkit instances are
149
152
  used
@@ -199,9 +202,10 @@ class HybridBrowserToolkit(BaseToolkit, RegisteredAgentToolkit):
199
202
  self._user_data_dir = user_data_dir
200
203
  self._stealth = stealth
201
204
  self._web_agent_model = web_agent_model
202
- self._cache_dir = cache_dir
205
+ self._cache_dir = cache_dir or "tmp/"
203
206
  self._browser_log_to_file = browser_log_to_file
204
- self._default_start_url = default_start_url
207
+ self._log_dir = log_dir
208
+ self._default_start_url = default_start_url or "https://google.com/"
205
209
  self._session_id = session_id or "default"
206
210
  self._viewport_limit = viewport_limit
207
211
 
@@ -237,7 +241,7 @@ class HybridBrowserToolkit(BaseToolkit, RegisteredAgentToolkit):
237
241
  # Set up log file if needed
238
242
  if self.log_to_file:
239
243
  # Create log directory if it doesn't exist
240
- log_dir = "browser_log"
244
+ log_dir = self._log_dir if self._log_dir else "browser_log"
241
245
  os.makedirs(log_dir, exist_ok=True)
242
246
 
243
247
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
@@ -15,7 +15,7 @@
15
15
  import base64
16
16
  import os
17
17
  from io import BytesIO
18
- from typing import List, Literal, Optional, Union
18
+ from typing import ClassVar, List, Literal, Optional, Tuple, Union
19
19
 
20
20
  from openai import OpenAI
21
21
  from PIL import Image
@@ -29,21 +29,32 @@ logger = get_logger(__name__)
29
29
 
30
30
 
31
31
  @MCPServer()
32
- class OpenAIImageToolkit(BaseToolkit):
33
- r"""A class toolkit for image generation using OpenAI's
34
- Image Generation API.
35
- """
36
-
37
- @api_keys_required(
38
- [
39
- ("api_key", "OPENAI_API_KEY"),
40
- ]
41
- )
32
+ class ImageGenToolkit(BaseToolkit):
33
+ r"""A class toolkit for image generation using Grok and OpenAI models."""
34
+
35
+ GROK_MODELS: ClassVar[List[str]] = [
36
+ "grok-2-image",
37
+ "grok-2-image-latest",
38
+ "grok-2-image-1212",
39
+ ]
40
+ OPENAI_MODELS: ClassVar[List[str]] = [
41
+ "gpt-image-1",
42
+ "dall-e-3",
43
+ "dall-e-2",
44
+ ]
45
+
42
46
  def __init__(
43
47
  self,
44
48
  model: Optional[
45
- Literal["gpt-image-1", "dall-e-3", "dall-e-2"]
46
- ] = "gpt-image-1",
49
+ Literal[
50
+ "gpt-image-1",
51
+ "dall-e-3",
52
+ "dall-e-2",
53
+ "grok-2-image",
54
+ "grok-2-image-latest",
55
+ "grok-2-image-1212",
56
+ ]
57
+ ] = "dall-e-3",
47
58
  timeout: Optional[float] = None,
48
59
  api_key: Optional[str] = None,
49
60
  url: Optional[str] = None,
@@ -72,12 +83,12 @@ class OpenAIImageToolkit(BaseToolkit):
72
83
  # NOTE: Some arguments are set in the constructor to prevent the agent
73
84
  # from making invalid API calls with model-specific parameters. For
74
85
  # example, the 'style' argument is only supported by 'dall-e-3'.
75
- r"""Initializes a new instance of the OpenAIImageToolkit class.
86
+ r"""Initializes a new instance of the ImageGenToolkit class.
76
87
 
77
88
  Args:
78
89
  api_key (Optional[str]): The API key for authenticating
79
- with the OpenAI service. (default: :obj:`None`)
80
- url (Optional[str]): The url to the OpenAI service.
90
+ with the image model service. (default: :obj:`None`)
91
+ url (Optional[str]): The url to the image model service.
81
92
  (default: :obj:`None`)
82
93
  model (Optional[str]): The model to use.
83
94
  (default: :obj:`"dall-e-3"`)
@@ -103,9 +114,23 @@ class OpenAIImageToolkit(BaseToolkit):
103
114
  image.(default: :obj:`"image_save"`)
104
115
  """
105
116
  super().__init__(timeout=timeout)
106
- api_key = api_key or os.environ.get("OPENAI_API_KEY")
107
- url = url or os.environ.get("OPENAI_API_BASE_URL")
108
- self.client = OpenAI(api_key=api_key, base_url=url)
117
+ if model not in self.GROK_MODELS + self.OPENAI_MODELS:
118
+ available_models = sorted(self.OPENAI_MODELS + self.GROK_MODELS)
119
+ raise ValueError(
120
+ f"Unsupported model: {model}. "
121
+ f"Supported models are: {available_models}"
122
+ )
123
+
124
+ # Set default url for Grok models
125
+ url = "https://api.x.ai/v1" if model in self.GROK_MODELS else url
126
+
127
+ api_key, base_url = (
128
+ self.get_openai_credentials(url, api_key)
129
+ if model in self.OPENAI_MODELS
130
+ else self.get_grok_credentials(url, api_key)
131
+ )
132
+
133
+ self.client = OpenAI(api_key=api_key, base_url=base_url)
109
134
  self.model = model
110
135
  self.size = size
111
136
  self.quality = quality
@@ -139,7 +164,7 @@ class OpenAIImageToolkit(BaseToolkit):
139
164
  return None
140
165
 
141
166
  def _build_base_params(self, prompt: str, n: Optional[int] = None) -> dict:
142
- r"""Build base parameters dict for OpenAI API calls.
167
+ r"""Build base parameters dict for Image Model API calls.
143
168
 
144
169
  Args:
145
170
  prompt (str): The text prompt for the image operation.
@@ -153,6 +178,10 @@ class OpenAIImageToolkit(BaseToolkit):
153
178
  # basic parameters supported by all models
154
179
  if n is not None:
155
180
  params["n"] = n # type: ignore[assignment]
181
+
182
+ if self.model in self.GROK_MODELS:
183
+ return params
184
+
156
185
  if self.size is not None:
157
186
  params["size"] = self.size
158
187
 
@@ -179,16 +208,18 @@ class OpenAIImageToolkit(BaseToolkit):
179
208
  params["quality"] = self.quality
180
209
  if self.background is not None:
181
210
  params["background"] = self.background
182
-
183
211
  return params
184
212
 
185
213
  def _handle_api_response(
186
- self, response, image_name: Union[str, List[str]], operation: str
214
+ self,
215
+ response,
216
+ image_name: Union[str, List[str]],
217
+ operation: str,
187
218
  ) -> str:
188
- r"""Handle API response from OpenAI image operations.
219
+ r"""Handle API response from image operations.
189
220
 
190
221
  Args:
191
- response: The response object from OpenAI API.
222
+ response: The response object from image model API.
192
223
  image_name (Union[str, List[str]]): Name(s) for the saved image
193
224
  file(s). If str, the same name is used for all images (will
194
225
  cause error for multiple images). If list, must have exactly
@@ -198,8 +229,9 @@ class OpenAIImageToolkit(BaseToolkit):
198
229
  Returns:
199
230
  str: Success message with image path/URL or error message.
200
231
  """
232
+ source = "Grok" if self.model in self.GROK_MODELS else "OpenAI"
201
233
  if response.data is None or len(response.data) == 0:
202
- error_msg = "No image data returned from OpenAI API."
234
+ error_msg = f"No image data returned from {source} API."
203
235
  logger.error(error_msg)
204
236
  return error_msg
205
237
 
@@ -283,7 +315,7 @@ class OpenAIImageToolkit(BaseToolkit):
283
315
  image_name: Union[str, List[str]] = "image.png",
284
316
  n: int = 1,
285
317
  ) -> str:
286
- r"""Generate an image using OpenAI's Image Generation models.
318
+ r"""Generate an image using image models.
287
319
  The generated image will be saved locally (for ``b64_json`` response
288
320
  formats) or an image URL will be returned (for ``url`` response
289
321
  formats).
@@ -309,15 +341,50 @@ class OpenAIImageToolkit(BaseToolkit):
309
341
  logger.error(error_msg)
310
342
  return error_msg
311
343
 
344
+ @api_keys_required([("api_key", "XAI_API_KEY")])
345
+ def get_grok_credentials(self, url, api_key) -> Tuple[str, str]: # type: ignore[return-value]
346
+ r"""Get API credentials for the specified Grok model.
347
+
348
+ Args:
349
+ url (str): The base URL for the Grok API.
350
+ api_key (str): The API key for the Grok API.
351
+
352
+ Returns:
353
+ tuple: (api_key, base_url)
354
+ """
355
+
356
+ # Get credentials based on model type
357
+ api_key = api_key or os.getenv("XAI_API_KEY")
358
+ return api_key, url
359
+
360
+ @api_keys_required([("api_key", "OPENAI_API_KEY")])
361
+ def get_openai_credentials(self, url, api_key) -> Tuple[str, str | None]: # type: ignore[return-value]
362
+ r"""Get API credentials for the specified OpenAI model.
363
+
364
+ Args:
365
+ url (str): The base URL for the OpenAI API.
366
+ api_key (str): The API key for the OpenAI API.
367
+
368
+ Returns:
369
+ Tuple[str, str | None]: (api_key, base_url)
370
+ """
371
+
372
+ api_key = api_key or os.getenv("OPENAI_API_KEY")
373
+ base_url = url or os.getenv("OPENAI_API_BASE_URL")
374
+ return api_key, base_url
375
+
312
376
  def get_tools(self) -> List[FunctionTool]:
313
- r"""Returns a list of FunctionTool objects representing the
314
- functions in the toolkit.
377
+ r"""Returns a list of FunctionTool objects representing the functions
378
+ in the toolkit.
315
379
 
316
380
  Returns:
317
- List[FunctionTool]: A list of FunctionTool objects
318
- representing the functions in the toolkit.
381
+ List[FunctionTool]: A list of FunctionTool objects representing the
382
+ functions in the toolkit.
319
383
  """
320
384
  return [
321
385
  FunctionTool(self.generate_image),
322
- # could add edit_image function later
323
386
  ]
387
+
388
+
389
+ # Backward compatibility alias
390
+ OpenAIImageToolkit = ImageGenToolkit
@@ -25,12 +25,38 @@ logger = get_logger(__name__)
25
25
 
26
26
  @MCPServer()
27
27
  class MarkItDownToolkit(BaseToolkit):
28
- r"""A class representing a toolkit for MarkItDown."""
28
+ r"""A class representing a toolkit for MarkItDown.
29
+
30
+ .. deprecated::
31
+ MarkItDownToolkit is deprecated. Use FileToolkit instead, which now
32
+ includes the same functionality through its read_file method that
33
+ supports both single files and multiple files.
34
+
35
+ Example migration:
36
+ # Old way
37
+ from camel.toolkits import MarkItDownToolkit
38
+ toolkit = MarkItDownToolkit()
39
+ content = toolkit.read_files(['file1.pdf', 'file2.docx'])
40
+
41
+ # New way
42
+ from camel.toolkits import FileToolkit
43
+ toolkit = FileToolkit()
44
+ content = toolkit.read_file(['file1.pdf', 'file2.docx'])
45
+ """
29
46
 
30
47
  def __init__(
31
48
  self,
32
49
  timeout: Optional[float] = None,
33
50
  ):
51
+ import warnings
52
+
53
+ warnings.warn(
54
+ "MarkItDownToolkit is deprecated and will be removed in a future "
55
+ "version. Please use FileToolkit instead, which now includes "
56
+ "read_file method that supports both single and multiple files.",
57
+ DeprecationWarning,
58
+ stacklevel=2,
59
+ )
34
60
  super().__init__(timeout=timeout)
35
61
 
36
62
  def read_files(self, file_paths: List[str]) -> Dict[str, str]:
@@ -12,6 +12,7 @@
12
12
  # limitations under the License.
13
13
  # ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
14
14
 
15
+ import warnings
15
16
  from typing import List
16
17
 
17
18
  from camel.toolkits.base import BaseToolkit
@@ -27,7 +28,7 @@ class MathToolkit(BaseToolkit):
27
28
  addition, subtraction, multiplication, division, and rounding.
28
29
  """
29
30
 
30
- def add(self, a: float, b: float) -> float:
31
+ def math_add(self, a: float, b: float) -> float:
31
32
  r"""Adds two numbers.
32
33
 
33
34
  Args:
@@ -39,7 +40,7 @@ class MathToolkit(BaseToolkit):
39
40
  """
40
41
  return a + b
41
42
 
42
- def sub(self, a: float, b: float) -> float:
43
+ def math_subtract(self, a: float, b: float) -> float:
43
44
  r"""Do subtraction between two numbers.
44
45
 
45
46
  Args:
@@ -51,7 +52,9 @@ class MathToolkit(BaseToolkit):
51
52
  """
52
53
  return a - b
53
54
 
54
- def multiply(self, a: float, b: float, decimal_places: int = 2) -> float:
55
+ def math_multiply(
56
+ self, a: float, b: float, decimal_places: int = 2
57
+ ) -> float:
55
58
  r"""Multiplies two numbers.
56
59
 
57
60
  Args:
@@ -65,7 +68,9 @@ class MathToolkit(BaseToolkit):
65
68
  """
66
69
  return round(a * b, decimal_places)
67
70
 
68
- def divide(self, a: float, b: float, decimal_places: int = 2) -> float:
71
+ def math_divide(
72
+ self, a: float, b: float, decimal_places: int = 2
73
+ ) -> float:
69
74
  r"""Divides two numbers.
70
75
 
71
76
  Args:
@@ -79,7 +84,7 @@ class MathToolkit(BaseToolkit):
79
84
  """
80
85
  return round(a / b, decimal_places)
81
86
 
82
- def round(self, a: float, decimal_places: int = 0) -> float:
87
+ def math_round(self, a: float, decimal_places: int = 0) -> float:
83
88
  r"""Rounds a number to a specified number of decimal places.
84
89
 
85
90
  Args:
@@ -101,9 +106,58 @@ class MathToolkit(BaseToolkit):
101
106
  representing the functions in the toolkit.
102
107
  """
103
108
  return [
104
- FunctionTool(self.add),
105
- FunctionTool(self.sub),
106
- FunctionTool(self.multiply),
107
- FunctionTool(self.divide),
108
- FunctionTool(self.round),
109
+ FunctionTool(self.math_add),
110
+ FunctionTool(self.math_subtract),
111
+ FunctionTool(self.math_multiply),
112
+ FunctionTool(self.math_divide),
113
+ FunctionTool(self.math_round),
109
114
  ]
115
+
116
+ # Deprecated method aliases for backward compatibility
117
+ def add(self, *args, **kwargs):
118
+ r"""Deprecated: Use math_add instead."""
119
+ warnings.warn(
120
+ "add is deprecated. Use math_add instead.",
121
+ DeprecationWarning,
122
+ stacklevel=2,
123
+ )
124
+ return self.math_add(*args, **kwargs)
125
+
126
+ def sub(self, *args, **kwargs):
127
+ r"""Deprecated: Use math_subtract instead."""
128
+ warnings.warn(
129
+ "sub is deprecated. Use math_subtract instead.",
130
+ DeprecationWarning,
131
+ stacklevel=2,
132
+ )
133
+ return self.math_subtract(*args, **kwargs)
134
+
135
+ def multiply(self, *args, **kwargs):
136
+ r"""Deprecated: Use math_multiply instead."""
137
+ warnings.warn(
138
+ "multiply is deprecated. Use math_multiply instead.",
139
+ DeprecationWarning,
140
+ stacklevel=2,
141
+ )
142
+ return self.math_multiply(*args, **kwargs)
143
+
144
+ def divide(self, *args, **kwargs):
145
+ r"""Deprecated: Use math_divide instead."""
146
+ warnings.warn(
147
+ "divide is deprecated. Use math_divide instead.",
148
+ DeprecationWarning,
149
+ stacklevel=2,
150
+ )
151
+ return self.math_divide(*args, **kwargs)
152
+
153
+ def round(self, *args, **kwargs):
154
+ r"""Deprecated: Use math_round instead. Note: This was shadowing
155
+ Python's built-in round().
156
+ """
157
+ warnings.warn(
158
+ "round is deprecated. Use math_round instead. This was "
159
+ "shadowing Python's built-in round().",
160
+ DeprecationWarning,
161
+ stacklevel=2,
162
+ )
163
+ return self.math_round(*args, **kwargs)