camel-ai 0.2.67__py3-none-any.whl → 0.2.80a2__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.
- camel/__init__.py +1 -1
- camel/agents/_types.py +6 -2
- camel/agents/_utils.py +38 -0
- camel/agents/chat_agent.py +4014 -410
- camel/agents/mcp_agent.py +30 -27
- camel/agents/repo_agent.py +2 -1
- camel/benchmarks/browsecomp.py +6 -6
- camel/configs/__init__.py +15 -0
- camel/configs/aihubmix_config.py +88 -0
- camel/configs/amd_config.py +70 -0
- camel/configs/cometapi_config.py +104 -0
- camel/configs/minimax_config.py +93 -0
- camel/configs/nebius_config.py +103 -0
- camel/configs/vllm_config.py +2 -0
- camel/data_collectors/alpaca_collector.py +15 -6
- camel/datagen/self_improving_cot.py +1 -1
- camel/datasets/base_generator.py +39 -10
- camel/environments/__init__.py +12 -0
- camel/environments/rlcards_env.py +860 -0
- camel/environments/single_step.py +28 -3
- camel/environments/tic_tac_toe.py +1 -1
- camel/interpreters/__init__.py +2 -0
- camel/interpreters/docker/Dockerfile +4 -16
- camel/interpreters/docker_interpreter.py +3 -2
- camel/interpreters/e2b_interpreter.py +34 -1
- camel/interpreters/internal_python_interpreter.py +51 -2
- camel/interpreters/microsandbox_interpreter.py +395 -0
- camel/loaders/__init__.py +11 -2
- camel/loaders/base_loader.py +85 -0
- camel/loaders/chunkr_reader.py +9 -0
- camel/loaders/firecrawl_reader.py +4 -4
- camel/logger.py +1 -1
- camel/memories/agent_memories.py +84 -1
- camel/memories/base.py +34 -0
- camel/memories/blocks/chat_history_block.py +122 -4
- camel/memories/blocks/vectordb_block.py +8 -1
- camel/memories/context_creators/score_based.py +29 -237
- camel/memories/records.py +88 -8
- camel/messages/base.py +166 -40
- camel/messages/func_message.py +32 -5
- camel/models/__init__.py +10 -0
- camel/models/aihubmix_model.py +83 -0
- camel/models/aiml_model.py +1 -16
- camel/models/amd_model.py +101 -0
- camel/models/anthropic_model.py +117 -18
- camel/models/aws_bedrock_model.py +2 -33
- camel/models/azure_openai_model.py +205 -91
- camel/models/base_audio_model.py +3 -1
- camel/models/base_model.py +189 -24
- camel/models/cohere_model.py +5 -17
- camel/models/cometapi_model.py +83 -0
- camel/models/crynux_model.py +1 -16
- camel/models/deepseek_model.py +6 -16
- camel/models/fish_audio_model.py +6 -0
- camel/models/gemini_model.py +71 -20
- camel/models/groq_model.py +1 -17
- camel/models/internlm_model.py +1 -16
- camel/models/litellm_model.py +49 -32
- camel/models/lmstudio_model.py +1 -17
- camel/models/minimax_model.py +83 -0
- camel/models/mistral_model.py +1 -16
- camel/models/model_factory.py +27 -1
- camel/models/model_manager.py +24 -6
- camel/models/modelscope_model.py +1 -16
- camel/models/moonshot_model.py +185 -19
- camel/models/nebius_model.py +83 -0
- camel/models/nemotron_model.py +0 -5
- camel/models/netmind_model.py +1 -16
- camel/models/novita_model.py +1 -16
- camel/models/nvidia_model.py +1 -16
- camel/models/ollama_model.py +4 -19
- camel/models/openai_compatible_model.py +171 -46
- camel/models/openai_model.py +205 -77
- camel/models/openrouter_model.py +1 -17
- camel/models/ppio_model.py +1 -16
- camel/models/qianfan_model.py +1 -16
- camel/models/qwen_model.py +1 -16
- camel/models/reka_model.py +1 -16
- camel/models/samba_model.py +34 -47
- camel/models/sglang_model.py +64 -31
- camel/models/siliconflow_model.py +1 -16
- camel/models/stub_model.py +0 -4
- camel/models/togetherai_model.py +1 -16
- camel/models/vllm_model.py +1 -16
- camel/models/volcano_model.py +0 -17
- camel/models/watsonx_model.py +1 -16
- camel/models/yi_model.py +1 -16
- camel/models/zhipuai_model.py +60 -16
- camel/parsers/__init__.py +18 -0
- camel/parsers/mcp_tool_call_parser.py +176 -0
- camel/retrievers/auto_retriever.py +1 -0
- camel/runtimes/configs.py +11 -11
- camel/runtimes/daytona_runtime.py +15 -16
- camel/runtimes/docker_runtime.py +6 -6
- camel/runtimes/remote_http_runtime.py +5 -5
- camel/services/agent_openapi_server.py +380 -0
- camel/societies/__init__.py +2 -0
- camel/societies/role_playing.py +26 -28
- camel/societies/workforce/__init__.py +2 -0
- camel/societies/workforce/events.py +122 -0
- camel/societies/workforce/prompts.py +249 -38
- camel/societies/workforce/role_playing_worker.py +82 -20
- camel/societies/workforce/single_agent_worker.py +634 -34
- camel/societies/workforce/structured_output_handler.py +512 -0
- camel/societies/workforce/task_channel.py +169 -23
- camel/societies/workforce/utils.py +176 -9
- camel/societies/workforce/worker.py +77 -23
- camel/societies/workforce/workflow_memory_manager.py +772 -0
- camel/societies/workforce/workforce.py +3168 -478
- camel/societies/workforce/workforce_callback.py +74 -0
- camel/societies/workforce/workforce_logger.py +203 -175
- camel/societies/workforce/workforce_metrics.py +33 -0
- camel/storages/__init__.py +4 -0
- camel/storages/key_value_storages/json.py +15 -2
- camel/storages/key_value_storages/mem0_cloud.py +48 -47
- camel/storages/object_storages/google_cloud.py +1 -1
- camel/storages/vectordb_storages/__init__.py +6 -0
- camel/storages/vectordb_storages/chroma.py +731 -0
- camel/storages/vectordb_storages/oceanbase.py +13 -13
- camel/storages/vectordb_storages/pgvector.py +349 -0
- camel/storages/vectordb_storages/qdrant.py +3 -3
- camel/storages/vectordb_storages/surreal.py +365 -0
- camel/storages/vectordb_storages/tidb.py +8 -6
- camel/tasks/task.py +244 -27
- camel/toolkits/__init__.py +46 -8
- camel/toolkits/aci_toolkit.py +64 -19
- camel/toolkits/arxiv_toolkit.py +6 -6
- camel/toolkits/base.py +63 -5
- camel/toolkits/code_execution.py +28 -1
- camel/toolkits/context_summarizer_toolkit.py +684 -0
- camel/toolkits/craw4ai_toolkit.py +93 -0
- camel/toolkits/dappier_toolkit.py +10 -6
- camel/toolkits/dingtalk.py +1135 -0
- camel/toolkits/edgeone_pages_mcp_toolkit.py +49 -0
- camel/toolkits/excel_toolkit.py +901 -67
- camel/toolkits/file_toolkit.py +1402 -0
- camel/toolkits/function_tool.py +30 -6
- camel/toolkits/github_toolkit.py +107 -20
- camel/toolkits/gmail_toolkit.py +1839 -0
- camel/toolkits/google_calendar_toolkit.py +38 -4
- camel/toolkits/google_drive_mcp_toolkit.py +54 -0
- camel/toolkits/human_toolkit.py +34 -10
- camel/toolkits/hybrid_browser_toolkit/__init__.py +18 -0
- camel/toolkits/hybrid_browser_toolkit/config_loader.py +185 -0
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py +246 -0
- camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py +1973 -0
- camel/toolkits/hybrid_browser_toolkit/installer.py +203 -0
- camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json +3749 -0
- camel/toolkits/hybrid_browser_toolkit/ts/package.json +32 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/browser-scripts.js +125 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts +1815 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/config-loader.ts +233 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/hybrid-browser-toolkit.ts +590 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/index.ts +7 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/parent-child-filter.ts +226 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/snapshot-parser.ts +219 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/som-screenshot-injected.ts +543 -0
- camel/toolkits/hybrid_browser_toolkit/ts/src/types.ts +130 -0
- camel/toolkits/hybrid_browser_toolkit/ts/tsconfig.json +26 -0
- camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js +319 -0
- camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +1032 -0
- camel/toolkits/hybrid_browser_toolkit_py/__init__.py +17 -0
- camel/toolkits/hybrid_browser_toolkit_py/actions.py +575 -0
- camel/toolkits/hybrid_browser_toolkit_py/agent.py +311 -0
- camel/toolkits/hybrid_browser_toolkit_py/browser_session.py +787 -0
- camel/toolkits/hybrid_browser_toolkit_py/config_loader.py +490 -0
- camel/toolkits/hybrid_browser_toolkit_py/hybrid_browser_toolkit.py +2390 -0
- camel/toolkits/hybrid_browser_toolkit_py/snapshot.py +233 -0
- camel/toolkits/hybrid_browser_toolkit_py/stealth_script.js +0 -0
- camel/toolkits/hybrid_browser_toolkit_py/unified_analyzer.js +1043 -0
- camel/toolkits/image_generation_toolkit.py +390 -0
- camel/toolkits/jina_reranker_toolkit.py +3 -4
- camel/toolkits/klavis_toolkit.py +5 -1
- camel/toolkits/markitdown_toolkit.py +104 -0
- camel/toolkits/math_toolkit.py +64 -10
- camel/toolkits/mcp_toolkit.py +370 -45
- camel/toolkits/memory_toolkit.py +5 -1
- camel/toolkits/message_agent_toolkit.py +608 -0
- camel/toolkits/message_integration.py +724 -0
- camel/toolkits/minimax_mcp_toolkit.py +195 -0
- camel/toolkits/note_taking_toolkit.py +277 -0
- camel/toolkits/notion_mcp_toolkit.py +224 -0
- camel/toolkits/openbb_toolkit.py +5 -1
- camel/toolkits/origene_mcp_toolkit.py +56 -0
- camel/toolkits/playwright_mcp_toolkit.py +12 -31
- camel/toolkits/pptx_toolkit.py +25 -12
- camel/toolkits/resend_toolkit.py +168 -0
- camel/toolkits/screenshot_toolkit.py +213 -0
- camel/toolkits/search_toolkit.py +437 -142
- camel/toolkits/slack_toolkit.py +104 -50
- camel/toolkits/sympy_toolkit.py +1 -1
- camel/toolkits/task_planning_toolkit.py +3 -3
- camel/toolkits/terminal_toolkit/__init__.py +18 -0
- camel/toolkits/terminal_toolkit/terminal_toolkit.py +957 -0
- camel/toolkits/terminal_toolkit/utils.py +532 -0
- camel/toolkits/thinking_toolkit.py +1 -1
- camel/toolkits/vertex_ai_veo_toolkit.py +590 -0
- camel/toolkits/video_analysis_toolkit.py +106 -26
- camel/toolkits/video_download_toolkit.py +17 -14
- camel/toolkits/web_deploy_toolkit.py +1219 -0
- camel/toolkits/wechat_official_toolkit.py +483 -0
- camel/toolkits/zapier_toolkit.py +5 -1
- camel/types/__init__.py +2 -2
- camel/types/agents/tool_calling_record.py +4 -1
- camel/types/enums.py +316 -40
- camel/types/openai_types.py +2 -2
- camel/types/unified_model_type.py +31 -4
- camel/utils/commons.py +36 -5
- camel/utils/constants.py +3 -0
- camel/utils/context_utils.py +1003 -0
- camel/utils/mcp.py +138 -4
- camel/utils/mcp_client.py +45 -1
- camel/utils/message_summarizer.py +148 -0
- camel/utils/token_counting.py +43 -20
- camel/utils/tool_result.py +44 -0
- {camel_ai-0.2.67.dist-info → camel_ai-0.2.80a2.dist-info}/METADATA +296 -85
- {camel_ai-0.2.67.dist-info → camel_ai-0.2.80a2.dist-info}/RECORD +219 -146
- camel/loaders/pandas_reader.py +0 -368
- camel/toolkits/dalle_toolkit.py +0 -175
- camel/toolkits/file_write_toolkit.py +0 -444
- camel/toolkits/openai_agent_toolkit.py +0 -135
- camel/toolkits/terminal_toolkit.py +0 -1037
- {camel_ai-0.2.67.dist-info → camel_ai-0.2.80a2.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.67.dist-info → camel_ai-0.2.80a2.dist-info}/licenses/LICENSE +0 -0
camel/toolkits/function_tool.py
CHANGED
|
@@ -156,7 +156,12 @@ def get_openai_tool_schema(func: Callable) -> Dict[str, Any]:
|
|
|
156
156
|
if (name := param.arg_name) in parameters_dict["properties"] and (
|
|
157
157
|
description := param.description
|
|
158
158
|
):
|
|
159
|
-
|
|
159
|
+
# OpenAI does not allow descriptions on properties that use $ref.
|
|
160
|
+
# To avoid schema errors, we only add the description if "$ref" is
|
|
161
|
+
# not present.
|
|
162
|
+
prop = parameters_dict["properties"][name]
|
|
163
|
+
if "$ref" not in prop:
|
|
164
|
+
prop["description"] = description
|
|
160
165
|
|
|
161
166
|
short_description = docstring.short_description or ""
|
|
162
167
|
long_description = docstring.long_description or ""
|
|
@@ -256,11 +261,24 @@ def sanitize_and_enforce_required(parameters_dict):
|
|
|
256
261
|
# This field is optional - add null to its type
|
|
257
262
|
current_type = field_schema.get('type')
|
|
258
263
|
has_ref = '$ref' in field_schema
|
|
264
|
+
has_any_of = 'anyOf' in field_schema
|
|
259
265
|
|
|
260
266
|
if has_ref:
|
|
261
267
|
# Fields with $ref shouldn't have additional type field
|
|
262
268
|
# The $ref itself defines the type structure
|
|
263
269
|
pass
|
|
270
|
+
elif has_any_of:
|
|
271
|
+
# Field already has anyOf
|
|
272
|
+
any_of_types = field_schema['anyOf']
|
|
273
|
+
has_null_type = any(
|
|
274
|
+
item.get('type') == 'null' for item in any_of_types
|
|
275
|
+
)
|
|
276
|
+
if not has_null_type:
|
|
277
|
+
# Add null type to anyOf
|
|
278
|
+
field_schema['anyOf'].append({'type': 'null'})
|
|
279
|
+
# Remove conflicting type field if it exists
|
|
280
|
+
if 'type' in field_schema:
|
|
281
|
+
del field_schema['type']
|
|
264
282
|
elif current_type:
|
|
265
283
|
if isinstance(current_type, str):
|
|
266
284
|
# Single type - convert to array with null
|
|
@@ -464,10 +482,15 @@ class FunctionTool:
|
|
|
464
482
|
result = self.func(*args, **kwargs)
|
|
465
483
|
return result
|
|
466
484
|
except Exception as e:
|
|
485
|
+
parts = []
|
|
486
|
+
if args:
|
|
487
|
+
parts.append(f"args={args}")
|
|
488
|
+
if kwargs:
|
|
489
|
+
parts.append(f"kwargs={kwargs}")
|
|
490
|
+
args_str = ", ".join(parts) if parts else "no arguments"
|
|
467
491
|
raise ValueError(
|
|
468
492
|
f"Execution of function {self.func.__name__} failed with "
|
|
469
|
-
f"
|
|
470
|
-
f"Error: {e}"
|
|
493
|
+
f"{args_str}. Error: {e}"
|
|
471
494
|
)
|
|
472
495
|
|
|
473
496
|
async def async_call(self, *args: Any, **kwargs: Any) -> Any:
|
|
@@ -531,9 +554,10 @@ class FunctionTool:
|
|
|
531
554
|
param_dict = properties[param_name]
|
|
532
555
|
if "description" not in param_dict:
|
|
533
556
|
warnings.warn(
|
|
534
|
-
f"Parameter description is missing "
|
|
535
|
-
f"
|
|
536
|
-
f"
|
|
557
|
+
f"Parameter description is missing for the "
|
|
558
|
+
f"function '{openai_tool_schema['function']['name']}'. "
|
|
559
|
+
f"The parameter definition is {param_dict}. "
|
|
560
|
+
f"This may affect the quality of tool calling."
|
|
537
561
|
)
|
|
538
562
|
|
|
539
563
|
def get_openai_tool_schema(self) -> Dict[str, Any]:
|
camel/toolkits/github_toolkit.py
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import logging
|
|
16
16
|
import os
|
|
17
|
+
import warnings
|
|
17
18
|
from typing import Dict, List, Literal, Optional, Union
|
|
18
19
|
|
|
19
20
|
from camel.toolkits import FunctionTool
|
|
@@ -80,7 +81,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
80
81
|
)
|
|
81
82
|
return GITHUB_ACCESS_TOKEN
|
|
82
83
|
|
|
83
|
-
def
|
|
84
|
+
def github_create_pull_request(
|
|
84
85
|
self,
|
|
85
86
|
repo_name: str,
|
|
86
87
|
file_path: str,
|
|
@@ -150,7 +151,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
150
151
|
else:
|
|
151
152
|
raise ValueError("PRs with multiple files aren't supported yet.")
|
|
152
153
|
|
|
153
|
-
def
|
|
154
|
+
def github_get_issue_list(
|
|
154
155
|
self, repo_name: str, state: Literal["open", "closed", "all"] = "all"
|
|
155
156
|
) -> List[Dict[str, object]]:
|
|
156
157
|
r"""Retrieves all issues from the GitHub repository.
|
|
@@ -158,7 +159,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
158
159
|
Args:
|
|
159
160
|
repo_name (str): The name of the GitHub repository.
|
|
160
161
|
state (Literal["open", "closed", "all"]): The state of pull
|
|
161
|
-
requests to retrieve. (default: :obj
|
|
162
|
+
requests to retrieve. (default: :obj:`all`)
|
|
162
163
|
Options are:
|
|
163
164
|
- "open": Retrieve only open pull requests.
|
|
164
165
|
- "closed": Retrieve only closed pull requests.
|
|
@@ -177,7 +178,9 @@ class GithubToolkit(BaseToolkit):
|
|
|
177
178
|
|
|
178
179
|
return issues_info
|
|
179
180
|
|
|
180
|
-
def
|
|
181
|
+
def github_get_issue_content(
|
|
182
|
+
self, repo_name: str, issue_number: int
|
|
183
|
+
) -> str:
|
|
181
184
|
r"""Retrieves the content of a specific issue by its number.
|
|
182
185
|
|
|
183
186
|
Args:
|
|
@@ -194,7 +197,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
194
197
|
except Exception as e:
|
|
195
198
|
return f"can't get Issue number {issue_number}: {e!s}"
|
|
196
199
|
|
|
197
|
-
def
|
|
200
|
+
def github_get_pull_request_list(
|
|
198
201
|
self, repo_name: str, state: Literal["open", "closed", "all"] = "all"
|
|
199
202
|
) -> List[Dict[str, object]]:
|
|
200
203
|
r"""Retrieves all pull requests from the GitHub repository.
|
|
@@ -202,7 +205,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
202
205
|
Args:
|
|
203
206
|
repo_name (str): The name of the GitHub repository.
|
|
204
207
|
state (Literal["open", "closed", "all"]): The state of pull
|
|
205
|
-
requests to retrieve. (default: :obj
|
|
208
|
+
requests to retrieve. (default: :obj:`all`)
|
|
206
209
|
Options are:
|
|
207
210
|
- "open": Retrieve only open pull requests.
|
|
208
211
|
- "closed": Retrieve only closed pull requests.
|
|
@@ -221,7 +224,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
221
224
|
|
|
222
225
|
return pull_requests_info
|
|
223
226
|
|
|
224
|
-
def
|
|
227
|
+
def github_get_pull_request_code(
|
|
225
228
|
self, repo_name: str, pr_number: int
|
|
226
229
|
) -> List[Dict[str, str]]:
|
|
227
230
|
r"""Retrieves the code changes of a specific pull request.
|
|
@@ -253,7 +256,7 @@ class GithubToolkit(BaseToolkit):
|
|
|
253
256
|
|
|
254
257
|
return files_changed
|
|
255
258
|
|
|
256
|
-
def
|
|
259
|
+
def github_get_pull_request_comments(
|
|
257
260
|
self, repo_name: str, pr_number: int
|
|
258
261
|
) -> List[Dict[str, str]]:
|
|
259
262
|
r"""Retrieves the comments from a specific pull request.
|
|
@@ -278,14 +281,16 @@ class GithubToolkit(BaseToolkit):
|
|
|
278
281
|
|
|
279
282
|
return comments
|
|
280
283
|
|
|
281
|
-
def
|
|
284
|
+
def github_get_all_file_paths(
|
|
285
|
+
self, repo_name: str, path: str = ""
|
|
286
|
+
) -> List[str]:
|
|
282
287
|
r"""Recursively retrieves all file paths in the GitHub repository.
|
|
283
288
|
|
|
284
289
|
Args:
|
|
285
290
|
repo_name (str): The name of the GitHub repository.
|
|
286
291
|
path (str): The repository path to start the traversal from.
|
|
287
292
|
empty string means starts from the root directory.
|
|
288
|
-
(default: :obj
|
|
293
|
+
(default: :obj:`""`)
|
|
289
294
|
|
|
290
295
|
Returns:
|
|
291
296
|
List[str]: A list of file paths within the specified directory
|
|
@@ -308,13 +313,15 @@ class GithubToolkit(BaseToolkit):
|
|
|
308
313
|
for content in contents:
|
|
309
314
|
if content.type == "dir":
|
|
310
315
|
# If it's a directory, recursively retrieve its file paths
|
|
311
|
-
files.extend(self.
|
|
316
|
+
files.extend(self.github_get_all_file_paths(content.path))
|
|
312
317
|
else:
|
|
313
318
|
# If it's a file, add its path to the list
|
|
314
319
|
files.append(content.path)
|
|
315
320
|
return files
|
|
316
321
|
|
|
317
|
-
def
|
|
322
|
+
def github_retrieve_file_content(
|
|
323
|
+
self, repo_name: str, file_path: str
|
|
324
|
+
) -> str:
|
|
318
325
|
r"""Retrieves the content of a file from the GitHub repository.
|
|
319
326
|
|
|
320
327
|
Args:
|
|
@@ -343,12 +350,92 @@ class GithubToolkit(BaseToolkit):
|
|
|
343
350
|
the functions in the toolkit.
|
|
344
351
|
"""
|
|
345
352
|
return [
|
|
346
|
-
FunctionTool(self.
|
|
347
|
-
FunctionTool(self.
|
|
348
|
-
FunctionTool(self.
|
|
349
|
-
FunctionTool(self.
|
|
350
|
-
FunctionTool(self.
|
|
351
|
-
FunctionTool(self.
|
|
352
|
-
FunctionTool(self.
|
|
353
|
-
FunctionTool(self.
|
|
353
|
+
FunctionTool(self.github_create_pull_request),
|
|
354
|
+
FunctionTool(self.github_get_issue_list),
|
|
355
|
+
FunctionTool(self.github_get_issue_content),
|
|
356
|
+
FunctionTool(self.github_get_pull_request_list),
|
|
357
|
+
FunctionTool(self.github_get_pull_request_code),
|
|
358
|
+
FunctionTool(self.github_get_pull_request_comments),
|
|
359
|
+
FunctionTool(self.github_get_all_file_paths),
|
|
360
|
+
FunctionTool(self.github_retrieve_file_content),
|
|
354
361
|
]
|
|
362
|
+
|
|
363
|
+
# Deprecated method aliases for backward compatibility
|
|
364
|
+
def create_pull_request(self, *args, **kwargs):
|
|
365
|
+
r"""Deprecated: Use github_create_pull_request instead."""
|
|
366
|
+
warnings.warn(
|
|
367
|
+
"create_pull_request is deprecated. Use "
|
|
368
|
+
"github_create_pull_request instead.",
|
|
369
|
+
DeprecationWarning,
|
|
370
|
+
stacklevel=2,
|
|
371
|
+
)
|
|
372
|
+
return self.github_create_pull_request(*args, **kwargs)
|
|
373
|
+
|
|
374
|
+
def get_issue_list(self, *args, **kwargs):
|
|
375
|
+
r"""Deprecated: Use github_get_issue_list instead."""
|
|
376
|
+
warnings.warn(
|
|
377
|
+
"get_issue_list is deprecated. Use github_get_issue_list instead.",
|
|
378
|
+
DeprecationWarning,
|
|
379
|
+
stacklevel=2,
|
|
380
|
+
)
|
|
381
|
+
return self.github_get_issue_list(*args, **kwargs)
|
|
382
|
+
|
|
383
|
+
def get_issue_content(self, *args, **kwargs):
|
|
384
|
+
r"""Deprecated: Use github_get_issue_content instead."""
|
|
385
|
+
warnings.warn(
|
|
386
|
+
"get_issue_content is deprecated. Use "
|
|
387
|
+
"github_get_issue_content instead.",
|
|
388
|
+
DeprecationWarning,
|
|
389
|
+
stacklevel=2,
|
|
390
|
+
)
|
|
391
|
+
return self.github_get_issue_content(*args, **kwargs)
|
|
392
|
+
|
|
393
|
+
def get_pull_request_list(self, *args, **kwargs):
|
|
394
|
+
r"""Deprecated: Use github_get_pull_request_list instead."""
|
|
395
|
+
warnings.warn(
|
|
396
|
+
"get_pull_request_list is deprecated. "
|
|
397
|
+
"Use github_get_pull_request_list instead.",
|
|
398
|
+
DeprecationWarning,
|
|
399
|
+
stacklevel=2,
|
|
400
|
+
)
|
|
401
|
+
return self.github_get_pull_request_list(*args, **kwargs)
|
|
402
|
+
|
|
403
|
+
def get_pull_request_code(self, *args, **kwargs):
|
|
404
|
+
r"""Deprecated: Use github_get_pull_request_code instead."""
|
|
405
|
+
warnings.warn(
|
|
406
|
+
"get_pull_request_code is deprecated. Use "
|
|
407
|
+
"github_get_pull_request_code instead.",
|
|
408
|
+
DeprecationWarning,
|
|
409
|
+
stacklevel=2,
|
|
410
|
+
)
|
|
411
|
+
return self.github_get_pull_request_code(*args, **kwargs)
|
|
412
|
+
|
|
413
|
+
def get_pull_request_comments(self, *args, **kwargs):
|
|
414
|
+
r"""Deprecated: Use github_get_pull_request_comments instead."""
|
|
415
|
+
warnings.warn(
|
|
416
|
+
"get_pull_request_comments is deprecated. "
|
|
417
|
+
"Use github_get_pull_request_comments instead.",
|
|
418
|
+
DeprecationWarning,
|
|
419
|
+
stacklevel=2,
|
|
420
|
+
)
|
|
421
|
+
return self.github_get_pull_request_comments(*args, **kwargs)
|
|
422
|
+
|
|
423
|
+
def get_all_file_paths(self, *args, **kwargs):
|
|
424
|
+
r"""Deprecated: Use github_get_all_file_paths instead."""
|
|
425
|
+
warnings.warn(
|
|
426
|
+
"get_all_file_paths is deprecated. Use "
|
|
427
|
+
"github_get_all_file_paths instead.",
|
|
428
|
+
DeprecationWarning,
|
|
429
|
+
stacklevel=2,
|
|
430
|
+
)
|
|
431
|
+
return self.github_get_all_file_paths(*args, **kwargs)
|
|
432
|
+
|
|
433
|
+
def retrieve_file_content(self, *args, **kwargs):
|
|
434
|
+
r"""Deprecated: Use github_retrieve_file_content instead."""
|
|
435
|
+
warnings.warn(
|
|
436
|
+
"retrieve_file_content is deprecated. "
|
|
437
|
+
"Use github_retrieve_file_content instead.",
|
|
438
|
+
DeprecationWarning,
|
|
439
|
+
stacklevel=2,
|
|
440
|
+
)
|
|
441
|
+
return self.github_retrieve_file_content(*args, **kwargs)
|