Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

feat: Add codespell support (config, workflow to detect/not fix) and make it fix few typos (#2086)

Yaroslav Halchenkoca02e43ad5af
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
new file mode 100644
index 000000000..e21712e4b
--- /dev/null
+++ b/.github/workflows/codespell.yml
@@ -0,0 +1,25 @@
+# Codespell configuration is within pyproject.toml
+---
+name: Codespell
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+permissions:
+ contents: read
+
+jobs:
+ codespell:
+ name: Check for spelling errors
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Annotate locations with typos
+ uses: codespell-project/codespell-problem-matcher@v1
+ - name: Codespell
+ uses: codespell-project/actions-codespell@v2
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 02c5a7235..bed195640 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -27,3 +27,11 @@ repos:
language: system
types: [python]
exclude: ^docs/cookbooks/ # Ignore files under docs/cookbooks
+
+ - repo: https://github.com/codespell-project/codespell
+ # Configuration for codespell is in pyproject.toml
+ rev: v2.4.1
+ hooks:
+ - id: codespell
+ additional_dependencies:
+ - tomli # for python_version < '3.11'
diff --git a/apps/agents/agents.py b/apps/agents/agents.py
index 17b1ca0a4..edcbed2e4 100644
--- a/apps/agents/agents.py
+++ b/apps/agents/agents.py
@@ -97,7 +97,7 @@ def parse_arguments():
'--server-port',
type=int,
default=8080,
- help='Port ot run the web page on',
+ help='Port to run the web page on',
)
parser.add_argument(
'--inbrowser',
diff --git a/apps/data_explorer/data_explorer.py b/apps/data_explorer/data_explorer.py
index eb285b499..1ad48272a 100644
--- a/apps/data_explorer/data_explorer.py
+++ b/apps/data_explorer/data_explorer.py
@@ -56,7 +56,7 @@ def parse_arguments():
'--server-port',
type=int,
default=8080,
- help='Port ot run the web page on',
+ help='Port to run the web page on',
)
parser.add_argument(
'--inbrowser',
@@ -399,7 +399,7 @@ def construct_ui(
def construct_blocks(data_path: str, default_dataset: Optional[str]):
- """Construct Blocs app but do not launch it.
+ """Construct Blocks app but do not launch it.
Args:
data_path (str): Path to the set of ZIP datasets.
diff --git a/apps/dilemma/dilemma.py b/apps/dilemma/dilemma.py
index c7b6c13fa..d7834d5db 100644
--- a/apps/dilemma/dilemma.py
+++ b/apps/dilemma/dilemma.py
@@ -60,7 +60,7 @@ def parse_arguments():
'--server-port',
type=int,
default=8080,
- help='Port ot run the web page on',
+ help='Port to run the web page on',
)
parser.add_argument(
'--inbrowser',
@@ -198,7 +198,7 @@ def construct_ui(
def construct_blocks(data_path: str, has_connection: bool):
- """Construct Blocs app but do not launch it.
+ """Construct Blocks app but do not launch it.
Args:
data_path (str): Path to the ZIP dataset with JOSNs inside.
diff --git a/camel/benchmarks/apibank.py b/camel/benchmarks/apibank.py
index c3bdfc434..850a33ca9 100644
--- a/camel/benchmarks/apibank.py
+++ b/camel/benchmarks/apibank.py
@@ -48,7 +48,7 @@ def process_messages(
Args:
chat_history (List[Dict[str, Any]):
A list of dictionaries representing the chat history.
- prompt (str): A propmt to be set as the system message.
+ prompt (str): A prompt to be set as the system message.
Returns:
List[Dict[str, str]]: A list of dictionaries representing
diff --git a/camel/benchmarks/apibench.py b/camel/benchmarks/apibench.py
index 7c5c5376f..90cac8f96 100644
--- a/camel/benchmarks/apibench.py
+++ b/camel/benchmarks/apibench.py
@@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
# Mapping of dataset names to file names
-# 'Oracle' retriver used here which means all the full
+# 'Oracle' retriever used here which means all the full
# API documentation will be included in the prompt
dataset_mapping = {
"huggingface": {
diff --git a/camel/datagen/self_improving_cot.py b/camel/datagen/self_improving_cot.py
index c78319777..ca2421e48 100644
--- a/camel/datagen/self_improving_cot.py
+++ b/camel/datagen/self_improving_cot.py
@@ -518,7 +518,7 @@ class SelfImprovingCoTPipeline:
self.reason_agent.model_backend.model_config_dict['n'] = (
self.rejection_sampling_n
)
- # Generate multiple condidate traces in one call using parameter n
+ # Generate multiple candidate traces in one call using parameter n
responses = self.reason_agent.step(prompt)
# Extract cancidate traces
candidate_traces = [choice.content for choice in responses.msgs]
diff --git a/camel/interpreters/docker_interpreter.py b/camel/interpreters/docker_interpreter.py
index b96f1db45..0763af063 100644
--- a/camel/interpreters/docker_interpreter.py
+++ b/camel/interpreters/docker_interpreter.py
@@ -185,7 +185,7 @@ class DockerInterpreter(BaseInterpreter):
code: str,
code_type: str,
) -> str:
- r"""Executes the given code in the conatiner attached to the
+ r"""Executes the given code in the container attached to the
interpreter, and captures the stdout and stderr streams.
Args:
diff --git a/camel/interpreters/internal_python_interpreter.py b/camel/interpreters/internal_python_interpreter.py
index 0eb08b9d4..4fb923e50 100644
--- a/camel/interpreters/internal_python_interpreter.py
+++ b/camel/interpreters/internal_python_interpreter.py
@@ -421,7 +421,7 @@ class InternalPythonInterpreter(BaseInterpreter):
result = None
if not isinstance(if_statement.test, ast.Compare):
raise InterpreterError(
- "Only Campare expr supported in if statement, get"
+ "Only Compare expr supported in if statement, get"
f" {if_statement.test.__class__.__name__}"
)
if self._execute_condition(if_statement.test):
diff --git a/camel/memories/blocks/chat_history_block.py b/camel/memories/blocks/chat_history_block.py
index 02671ec66..b2f3a6dc1 100644
--- a/camel/memories/blocks/chat_history_block.py
+++ b/camel/memories/blocks/chat_history_block.py
@@ -38,7 +38,7 @@ class ChatHistoryBlock(MemoryBlock):
keep_rate (float, optional): In historical messages, the score of the
last message is 1.0, and with each step taken backward, the score
of the message is multiplied by the `keep_rate`. Higher `keep_rate`
- leads to high possiblity to keep history messages during context
+ leads to high possibility to keep history messages during context
creation.
"""
diff --git a/camel/memories/context_creators/score_based.py b/camel/memories/context_creators/score_based.py
index d1a05b9b3..dfa0ba3d3 100644
--- a/camel/memories/context_creators/score_based.py
+++ b/camel/memories/context_creators/score_based.py
@@ -168,7 +168,7 @@ class ScoreBasedContextCreator(BaseContextCreator):
# 6. Output Assembly
# ======================
- # Incase system message is the only message in memory when sorted units
+ # In case system message is the only message in memory when sorted units
# are empty, raise an error
if system_unit and len(remaining_units) == 0 and len(records) > 1:
raise RuntimeError(
diff --git a/camel/models/openai_audio_models.py b/camel/models/openai_audio_models.py
index 30eee527a..4d9dd14fe 100644
--- a/camel/models/openai_audio_models.py
+++ b/camel/models/openai_audio_models.py
@@ -78,8 +78,8 @@ class OpenAIAudioModels(BaseAudioModel):
Returns:
Union[List[_legacy_response.HttpxBinaryResponseContent],
_legacy_response.HttpxBinaryResponseContent]: List of response
- content object from OpenAI if input charaters more than 4096,
- single response content if input charaters less than 4096.
+ content object from OpenAI if input characters more than 4096,
+ single response content if input characters less than 4096.
Raises:
Exception: If there's an error during the TTS API call.
diff --git a/camel/models/togetherai_model.py b/camel/models/togetherai_model.py
index 5fad0024b..e51a0f644 100644
--- a/camel/models/togetherai_model.py
+++ b/camel/models/togetherai_model.py
@@ -113,7 +113,7 @@ class TogetherAIModel(BaseModelBackend):
`ChatCompletion` in the non-stream mode, or
`AsyncStream[ChatCompletionChunk]` in the stream mode.
"""
- # Use OpenAI cilent as interface call Together AI
+ # Use OpenAI client as interface call Together AI
# Reference: https://docs.together.ai/docs/openai-api-compatibility
response = await self._async_client.chat.completions.create(
messages=messages,
@@ -139,7 +139,7 @@ class TogetherAIModel(BaseModelBackend):
`ChatCompletion` in the non-stream mode, or
`Stream[ChatCompletionChunk]` in the stream mode.
"""
- # Use OpenAI cilent as interface call Together AI
+ # Use OpenAI client as interface call Together AI
# Reference: https://docs.together.ai/docs/openai-api-compatibility
response = self._client.chat.completions.create(
messages=messages,
diff --git a/camel/models/vllm_model.py b/camel/models/vllm_model.py
index 35e736433..d4d69e7dd 100644
--- a/camel/models/vllm_model.py
+++ b/camel/models/vllm_model.py
@@ -77,7 +77,7 @@ class VLLMModel(BaseModelBackend):
)
if not self._url:
self._start_server()
- # Use OpenAI cilent as interface call vLLM
+ # Use OpenAI client as interface call vLLM
self._client = OpenAI(
timeout=self._timeout,
max_retries=3,
diff --git a/camel/models/zhipuai_model.py b/camel/models/zhipuai_model.py
index f040d56d2..ef28fac50 100644
--- a/camel/models/zhipuai_model.py
+++ b/camel/models/zhipuai_model.py
@@ -111,7 +111,7 @@ class ZhipuAIModel(BaseModelBackend):
`ChatCompletion` in the non-stream mode, or
`AsyncStream[ChatCompletionChunk]` in the stream mode.
"""
- # Use OpenAI cilent as interface call ZhipuAI
+ # Use OpenAI client as interface call ZhipuAI
# Reference: https://open.bigmodel.cn/dev/api#openai_sdk
response = await self._async_client.chat.completions.create(
messages=messages,
@@ -137,7 +137,7 @@ class ZhipuAIModel(BaseModelBackend):
`ChatCompletion` in the non-stream mode, or
`Stream[ChatCompletionChunk]` in the stream mode.
"""
- # Use OpenAI cilent as interface call ZhipuAI
+ # Use OpenAI client as interface call ZhipuAI
# Reference: https://open.bigmodel.cn/dev/api#openai_sdk
response = self._client.chat.completions.create(
messages=messages,
diff --git a/camel/retrievers/vector_retriever.py b/camel/retrievers/vector_retriever.py
index dfa0db504..177aee244 100644
--- a/camel/retrievers/vector_retriever.py
+++ b/camel/retrievers/vector_retriever.py
@@ -224,7 +224,7 @@ class VectorRetriever(BaseRetriever):
if top_k <= 0:
raise ValueError("top_k must be a positive integer.")
- # Load the storage incase it's hosted remote
+ # Load the storage in case it's hosted remote
self.storage.load()
query_vector = self.embedding_model.embed(obj=query)
diff --git a/camel/storages/graph_storages/neo4j_graph.py b/camel/storages/graph_storages/neo4j_graph.py
index e0927edd5..aee7d924b 100644
--- a/camel/storages/graph_storages/neo4j_graph.py
+++ b/camel/storages/graph_storages/neo4j_graph.py
@@ -69,7 +69,7 @@ class Neo4jGraph(BaseGraphStorage):
The detailed information about Neo4j is available at:
`Neo4j https://neo4j.com/docs/getting-started`
- This module refered to the work of Langchian and Llamaindex.
+ This module referred to the work of Langchian and Llamaindex.
Args:
url (str): The URL of the Neo4j database server.
diff --git a/camel/storages/vectordb_storages/base.py b/camel/storages/vectordb_storages/base.py
index fe55a42e8..0ae86d55d 100644
--- a/camel/storages/vectordb_storages/base.py
+++ b/camel/storages/vectordb_storages/base.py
@@ -100,7 +100,7 @@ class VectorDBStatus(BaseModel):
r"""Vector database status.
Attributes:
- vector_dim (int): The dimention of stored vectors.
+ vector_dim (int): The dimension of stored vectors.
vector_count (int): The number of stored vectors.
"""
@@ -204,7 +204,7 @@ class BaseVectorStorage(ABC):
Args:
vector (List[float]): The search vector.
- top_k (int): The number of top similer vectors.
+ top_k (int): The number of top similar vectors.
Returns:
List[List[Dict[str, Any]]]: A list of vector payloads retrieved
diff --git a/camel/storages/vectordb_storages/milvus.py b/camel/storages/vectordb_storages/milvus.py
index 1537b0fcb..083bb64a7 100644
--- a/camel/storages/vectordb_storages/milvus.py
+++ b/camel/storages/vectordb_storages/milvus.py
@@ -36,7 +36,7 @@ class MilvusStorage(BaseVectorStorage):
`Milvus <https://milvus.io/docs/overview.md/>`_
Args:
- vector_dim (int): The dimenstion of storing vectors.
+ vector_dim (int): The dimension of storing vectors.
url_and_api_key (Tuple[str, str]): Tuple containing
the URL and API key for connecting to a remote Milvus instance.
URL maps to Milvus uri concept, typically "endpoint:port".
@@ -136,7 +136,7 @@ class MilvusStorage(BaseVectorStorage):
schema.add_field(
field_name="id",
datatype=DataType.VARCHAR,
- descrition='A unique identifier for the vector',
+ description='A unique identifier for the vector',
is_primary=True,
max_length=65535,
)
diff --git a/camel/storages/vectordb_storages/qdrant.py b/camel/storages/vectordb_storages/qdrant.py
index 8aec17a36..1efaa229c 100644
--- a/camel/storages/vectordb_storages/qdrant.py
+++ b/camel/storages/vectordb_storages/qdrant.py
@@ -40,7 +40,7 @@ class QdrantStorage(BaseVectorStorage):
`Qdrant <https://qdrant.tech/>`_
Args:
- vector_dim (int): The dimenstion of storing vectors.
+ vector_dim (int): The dimension of storing vectors.
collection_name (Optional[str], optional): Name for the collection in
the Qdrant. If not provided, set it to the current time with iso
format. (default: :obj:`None`)
@@ -218,7 +218,7 @@ class QdrantStorage(BaseVectorStorage):
)
def _collection_exists(self, collection_name: str) -> bool:
- r"""Returns wether the collection exists in the database"""
+ r"""Returns whether the collection exists in the database"""
for c in self._client.get_collections().collections:
if collection_name == c.name:
return True
diff --git a/camel/tasks/task.py b/camel/tasks/task.py
index 3490b894e..9d05d8fda 100644
--- a/camel/tasks/task.py
+++ b/camel/tasks/task.py
@@ -178,7 +178,7 @@ class Task(BaseModel):
return None
def to_string(self, indent: str = "", state: bool = False) -> str:
- r"""Convert task to a sting.
+ r"""Convert task to a string.
Args:
indent (str): The ident for hierarchical tasks.
@@ -196,7 +196,7 @@ class Task(BaseModel):
return _str
def get_result(self, indent: str = "") -> str:
- r"""Get task result to a sting.
+ r"""Get task result to a string.
Args:
indent (str): The ident for hierarchical tasks.
diff --git a/camel/toolkits/ask_news_toolkit.py b/camel/toolkits/ask_news_toolkit.py
index ed5ed2a7d..9c4c0d74f 100644
--- a/camel/toolkits/ask_news_toolkit.py
+++ b/camel/toolkits/ask_news_toolkit.py
@@ -160,7 +160,7 @@ class AskNewsToolkit(BaseToolkit):
each update. (default: :obj:`10`)
Returns:
- Unio[dict, str]: A dictionary containing the stories and their
+ Union[dict, str]: A dictionary containing the stories and their
associated data, or error message if the process fails.
"""
try:
@@ -454,7 +454,7 @@ class AsyncAskNewsToolkit(BaseToolkit):
each update. (default: :obj:`10`)
Returns:
- Unio[dict, str]: A dictionary containing the stories and their
+ Union[dict, str]: A dictionary containing the stories and their
associated data, or error message if the process fails.
"""
try:
diff --git a/camel/toolkits/code_execution.py b/camel/toolkits/code_execution.py
index fe6e53a91..380b454b5 100644
--- a/camel/toolkits/code_execution.py
+++ b/camel/toolkits/code_execution.py
@@ -27,7 +27,7 @@ from camel.utils import MCPServer
@MCPServer()
class CodeExecutionToolkit(BaseToolkit):
- r"""A tookit for code execution.
+ r"""A toolkit for code execution.
Args:
sandbox (str): The environment type used to execute code.
diff --git a/camel/utils/commons.py b/camel/utils/commons.py
index 3cd52b339..96bd4fa80 100644
--- a/camel/utils/commons.py
+++ b/camel/utils/commons.py
@@ -163,7 +163,7 @@ def get_task_list(task_response: str) -> List[str]:
def check_server_running(server_url: str) -> bool:
- r"""Check whether the port refered by the URL to the server
+ r"""Check whether the port referred by the URL to the server
is open.
Args:
diff --git a/camel/utils/constants.py b/camel/utils/constants.py
index 9adadea98..de8ea1c4c 100644
--- a/camel/utils/constants.py
+++ b/camel/utils/constants.py
@@ -30,8 +30,8 @@ class Constants:
# Return response with json format
FUNC_NAME_FOR_STRUCTURED_OUTPUT = "return_json_response"
- # Default top k vaule for RAG
+ # Default top k value for RAG
DEFAULT_TOP_K_RESULTS = 1
- # Default similarity threshold vaule for RAG
+ # Default similarity threshold value for RAG
DEFAULT_SIMILARITY_THRESHOLD = 0.7
diff --git a/docs/cookbooks/advanced_features/agents_tracking.ipynb b/docs/cookbooks/advanced_features/agents_tracking.ipynb
index 6de324495..19bde62be 100644
--- a/docs/cookbooks/advanced_features/agents_tracking.ipynb
+++ b/docs/cookbooks/advanced_features/agents_tracking.ipynb
@@ -190,7 +190,7 @@
"id": "Kc3uKwd71sHG"
},
"source": [
- "Initilize AgentOps, you need to import toolkits after init of agentops so that the tool useage would be tracked."
+ "Initialize AgentOps, you need to import toolkits after init of agentops so that the tool usage would be tracked."
]
},
{
@@ -372,7 +372,7 @@
"id": "W-lbshs42tFE"
},
"source": [
- "Initilize AgentOps, you need to import toolkits after init of agentops so that the tool useage would be tracked."
+ "Initialize AgentOps, you need to import toolkits after init of agentops so that the tool usage would be tracked."
]
},
{
diff --git a/docs/cookbooks/advanced_features/agents_with_graph_rag.ipynb b/docs/cookbooks/advanced_features/agents_with_graph_rag.ipynb
index 734cec66d..bd9e1f601 100644
--- a/docs/cookbooks/advanced_features/agents_with_graph_rag.ipynb
+++ b/docs/cookbooks/advanced_features/agents_with_graph_rag.ipynb
@@ -299,7 +299,7 @@
"CAMEL has developed a knowledge graph agent can run with Mistral AI's most\n",
"advanced model, the Mistral Large 2. This knowledge graph agent is capable\n",
"of extracting entities and relationships from given content and create knowledge\n",
- "graphs automaticlly.\n",
+ "graphs automatically.\n",
"\"\"\""
]
},
@@ -534,7 +534,7 @@
"id": "Yq6kGaEJeI53"
},
"source": [
- "Retrieve related content using the vector retriever, here we take Mistral AI's news in the website as example conetent, you can also set the local file path here:"
+ "Retrieve related content using the vector retriever, here we take Mistral AI's news in the website as example content, you can also set the local file path here:"
]
},
{
@@ -584,7 +584,7 @@
},
"outputs": [],
"source": [
- "# Parse conetent from mistral website and create knowledge graph data by using\n",
+ "# Parse content from mistral website and create knowledge graph data by using\n",
"# the Knowledge Graph Agent, store the information into graph database.\n",
"\n",
"elements = uio.parse_file_or_url(\n",
@@ -656,7 +656,7 @@
}
],
"source": [
- "# Match the enetity got from query in the knowledge graph storage content\n",
+ "# Match the entity got from query in the knowledge graph storage content\n",
"kg_result = []\n",
"for node in ans_element.nodes:\n",
" n4j_query = f\"\"\"\n",
@@ -692,7 +692,7 @@
},
"outputs": [],
"source": [
- "# combine result from vector seach and knowledge graph entity search\n",
+ "# combine result from vector search and knowledge graph entity search\n",
"comined_results = str(vector_result) + \"\\n\".join(kg_result)"
]
},
@@ -785,7 +785,7 @@
"camel_agent = ChatAgent(system_message=sys_msg,\n",
" model=mistral_large_2)\n",
"\n",
- "# Pass the retrieved infomation to agent\n",
+ "# Pass the retrieved information to agent\n",
"user_prompt=f\"\"\"\n",
"The Original Query is {query}\n",
"The Retrieved Context is {comined_results}\n",
diff --git a/docs/cookbooks/advanced_features/agents_with_rag.ipynb b/docs/cookbooks/advanced_features/agents_with_rag.ipynb
index 7d3bb26a8..19727d641 100644
--- a/docs/cookbooks/advanced_features/agents_with_rag.ipynb
+++ b/docs/cookbooks/advanced_features/agents_with_rag.ipynb
@@ -37,7 +37,7 @@
"id": "AwnfLQvMvtXo"
},
"source": [
- "In this notebook, we show the useage of CAMEL Retrieve Module in both customized way and auto way. We will also show how to combine `AutoRetriever` with `ChatAgent`, and further combine `AutoRetriever` with `RolePlaying` by using `Function Calling`.\n",
+ "In this notebook, we show the usage of CAMEL Retrieve Module in both customized way and auto way. We will also show how to combine `AutoRetriever` with `ChatAgent`, and further combine `AutoRetriever` with `RolePlaying` by using `Function Calling`.\n",
"\n",
"4 main parts included:\n",
"\n",
@@ -335,7 +335,7 @@
"- Set content input paths, which can be local paths or remote urls\n",
"- Give a query\n",
"\n",
- "The Auto RAG pipeline would create collections for given content input paths, the collection name will be set automaticlly based on the content input path name, if the collection exists, it will do the retrieve directly."
+ "The Auto RAG pipeline would create collections for given content input paths, the collection name will be set automatically based on the content input path name, if the collection exists, it will do the retrieve directly."
]
},
{
@@ -367,7 +367,7 @@
" embedding_model=embedding_instance)\n",
"\n",
"retrieved_info = auto_retriever.run_vector_retriever(\n",
- " query=\"If I'm interest in contributing to the CAMEL projec, what should I do?\",\n",
+ " query=\"If I'm interest in contributing to the CAMEL project, what should I do?\",\n",
" contents=[\n",
" \"local_data/camel_paper.pdf\", # example local path\n",
" \"https://github.com/camel-ai/camel/wiki/Contributing-Guidlines\", # example remote url\n",
@@ -442,7 +442,7 @@
" similarity_threshold=0.5\n",
" )\n",
"\n",
- " # Pass the retrieved infomation to agent\n",
+ " # Pass the retrieved information to agent\n",
" user_msg = str(retrieved_info)\n",
" agent = ChatAgent(assistant_sys_msg)\n",
"\n",
@@ -450,7 +450,7 @@
" assistant_response = agent.step(user_msg)\n",
" return assistant_response.msg.content\n",
"\n",
- "print(single_agent(\"If I'm interest in contributing to the CAMEL projec, what should I do?\"))"
+ "print(single_agent(\"If I'm interest in contributing to the CAMEL project, what should I do?\"))"
]
},
{
diff --git a/docs/cookbooks/advanced_features/critic_agents_and_tree_search.ipynb b/docs/cookbooks/advanced_features/critic_agents_and_tree_search.ipynb
index 839039048..36f8fb0de 100644
--- a/docs/cookbooks/advanced_features/critic_agents_and_tree_search.ipynb
+++ b/docs/cookbooks/advanced_features/critic_agents_and_tree_search.ipynb
@@ -66,7 +66,7 @@
"id": "u9NVFz-HVLXb"
},
"source": [
- "### 🕹 Step 0: Prepartions"
+ "### 🕹 Step 0: Preparations"
]
},
{
@@ -374,7 +374,7 @@
"source": [
"def is_terminated(response):\n",
" \"\"\"\n",
- " Give alerts when the session shuold be terminated.\n",
+ " Give alerts when the session should be terminated.\n",
" \"\"\"\n",
" if response.terminated:\n",
" role = response.msg.role_type.name\n",
@@ -1475,7 +1475,7 @@
"\n",
"7. **Crisis Management Protocol**:\n",
" - **Emergency Communication Plan**: Develop an emergency protocol for immediate communication in the event of a major crisis or catastrophic outcome stemming from the alteration. This should include predetermined methods for rapid response and adjustment.\n",
- " - **Backup Communication Channels**: Create alternative communication channels (e.g., coded messages, discreet signals) to ensure the ability to communicate even if primary methods fail.\n",
+ " - **Backup Communication Channels**: Create alternative communication channels (e.g., coded messages, discrete signals) to ensure the ability to communicate even if primary methods fail.\n",
"\n",
"By implementing this communication strategy, we can effectively assess the impacts of the alteration in real-time, allowing for adaptive responses and ensuring that the timeline moves toward a more stable and positive outcome.\n",
"\n",
diff --git a/docs/cookbooks/advanced_features/embodied_agents.ipynb b/docs/cookbooks/advanced_features/embodied_agents.ipynb
index 7d90f3d13..977abb162 100644
--- a/docs/cookbooks/advanced_features/embodied_agents.ipynb
+++ b/docs/cookbooks/advanced_features/embodied_agents.ipynb
@@ -49,7 +49,7 @@
"id": "u9NVFz-HVLXb"
},
"source": [
- "### 🕹 Step 0: Prepartions"
+ "### 🕹 Step 0: Preparations"
]
},
{
diff --git a/docs/cookbooks/applications/finance_discord_bot.ipynb b/docs/cookbooks/applications/finance_discord_bot.ipynb
index 2d7ce0a47..2b30cd009 100644
--- a/docs/cookbooks/applications/finance_discord_bot.ipynb
+++ b/docs/cookbooks/applications/finance_discord_bot.ipynb
@@ -419,7 +419,7 @@
"id": "Qub28k5cOLIJ"
},
"source": [
- "As we can see above in the tool call records, the agent automatically identify which tools to use and accurately utilizes the tools to retrive relevant data."
+ "As we can see above in the tool call records, the agent automatically identify which tools to use and accurately utilizes the tools to retrieve relevant data."
]
},
{
diff --git a/docs/cookbooks/applications/roleplaying_scraper.ipynb b/docs/cookbooks/applications/roleplaying_scraper.ipynb
index 5e42adf03..b96e8c666 100644
--- a/docs/cookbooks/applications/roleplaying_scraper.ipynb
+++ b/docs/cookbooks/applications/roleplaying_scraper.ipynb
@@ -784,7 +784,7 @@
" text_input (str): The input text from which the knowledge graph is to be constructed.\n",
"\n",
" Returns:\n",
- " graph_elements: The generated graph element from knowlegde graph agent.\n",
+ " graph_elements: The generated graph element from knowledge graph agent.\n",
" \"\"\"\n",
"\n",
" # Set Neo4j instance\n",
@@ -865,7 +865,7 @@
"task_prompt = \"\"\"Do a comprehensive study of the Turkish shooter in 2024 paris\n",
"olympics, write a report for me, then create a knowledge graph for the report.\n",
"You should use search tool to get related URLs first, then use retrieval tool\n",
- "to get the retrieved content back by providing the list of URLs, finially\n",
+ "to get the retrieved content back by providing the list of URLs, finally\n",
"use tool to build the knowledge graph to finish the task.\n",
"No more other actions needed\"\"\""
]
@@ -972,7 +972,7 @@
"Do a comprehensive study of the Turkish shooter in 2024 paris\n",
"olympics, write a report for me, then create a knowledge graph for the report.\n",
"You should use search tool to get related URLs first, then use retrieval tool\n",
- "to get the retrieved content back by providing the list of URLs, finially\n",
+ "to get the retrieved content back by providing the list of URLs, finally\n",
"use tool to build the knowledge graph to finish the task.\n",
"No more other actions needed\n",
"\n",
@@ -983,7 +983,7 @@
"Do a comprehensive study of the Turkish shooter in 2024 paris\n",
"olympics, write a report for me, then create a knowledge graph for the report.\n",
"You should use search tool to get related URLs first, then use retrieval tool\n",
- "to get the retrieved content back by providing the list of URLs, finially\n",
+ "to get the retrieved content back by providing the list of URLs, finally\n",
"use tool to build the knowledge graph to finish the task.\n",
"No more other actions needed\n",
"\n"
diff --git a/docs/cookbooks/basic_concepts/create_your_first_agents_society.ipynb b/docs/cookbooks/basic_concepts/create_your_first_agents_society.ipynb
index 3018a28a3..284f35225 100644
--- a/docs/cookbooks/basic_concepts/create_your_first_agents_society.ipynb
+++ b/docs/cookbooks/basic_concepts/create_your_first_agents_society.ipynb
@@ -401,7 +401,7 @@
"1. **Identify Key Figures**:\n",
" - Focus on influential signers such as Thomas Jefferson (the principal author), John Adams, Benjamin Franklin, and George Washington. Their thoughts and actions will significantly impact the document's content and the overall sentiment of the Congress.\n",
"\n",
- "2. **Establish a Discreet Presence**:\n",
+ "2. **Establish a Discrete Presence**:\n",
" - Utilize the time machine to arrive a few days before the signing. This allows for a low-profile presence in Philadelphia, where the Continental Congress is convening. Disguise as a local merchant or a visitor to blend in with the crowd.\n",
"\n",
"3. **Engage in Informal Conversations**:\n",
@@ -501,7 +501,7 @@
" - Encourage open dialogue about the content of the Declaration, subtly guiding discussions toward key themes.\n",
"\n",
"- **Subtle Suggestions**: \n",
- " - During the drafting process, make discreet suggestions to key figures about phrasing or ideas that emphasize equality and justice.\n",
+ " - During the drafting process, make discrete suggestions to key figures about phrasing or ideas that emphasize equality and justice.\n",
" - Frame these suggestions as collective thoughts to ensure they feel organic.\n",
"\n",
"- **Monitor Reactions**: \n",
diff --git a/docs/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.ipynb b/docs/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.ipynb
index f882ee416..165860a4d 100644
--- a/docs/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.ipynb
+++ b/docs/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.ipynb
@@ -1329,7 +1329,7 @@
" # Can select any from the below:\n",
" # \"unsloth/Qwen2.5-0.5B\", \"unsloth/Qwen2.5-1.5B\", \"unsloth/Qwen2.5-3B\"\n",
" # \"unsloth/Qwen2.5-14B\", \"unsloth/Qwen2.5-32B\", \"unsloth/Qwen2.5-72B\",\n",
- " # And also all Instruct versions and Math. Coding verisons!\n",
+ " # And also all Instruct versions and Math. Coding versions!\n",
" model_name = \"unsloth/Qwen2.5-1.5B\",\n",
" max_seq_length = max_seq_length,\n",
" dtype = dtype,\n",
@@ -2318,7 +2318,7 @@
"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n",
"\n",
"### Instruction:\n",
- "which one is bigger bewteen 9.11 and 9.9?\n",
+ "which one is bigger between 9.11 and 9.9?\n",
"\n",
"### Input:\n",
"\n",
@@ -2370,7 +2370,7 @@
"inputs = tokenizer(\n",
"[\n",
" alpaca_prompt.format(\n",
- " \"which one is bigger bewteen 9.11 and 9.9?\", # instruction\n",
+ " \"which one is bigger between 9.11 and 9.9?\", # instruction\n",
" \"\", # input\n",
" \"\", # output - leave this blank for generation!\n",
" )\n",
diff --git a/docs/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.ipynb b/docs/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.ipynb
index d64db48aa..dc8a805f1 100644
--- a/docs/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.ipynb
+++ b/docs/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.ipynb
@@ -177,7 +177,7 @@
{
"cell_type": "markdown",
"source": [
- "The following function retrieves relevant information from a list of URLs based on a given query. It combines web scraping with Firecrawl and CAMEL's AutoRetriever for a seamless information retrieval process. (Some explaination)"
+ "The following function retrieves relevant information from a list of URLs based on a given query. It combines web scraping with Firecrawl and CAMEL's AutoRetriever for a seamless information retrieval process. (Some explanation)"
],
"metadata": {
"id": "QVB-Xra8QIU1"
diff --git a/docs/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.ipynb b/docs/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.ipynb
index a0a458b8d..e879429f1 100644
--- a/docs/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.ipynb
+++ b/docs/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.ipynb
@@ -49,7 +49,7 @@
"In this notebook, you'll explore:\n",
"\n",
"- **CAMEL**: A powerful multi-agent framework that enables synthetic data generation and multi-agent role-playing scenarios, enabling advanced AI-driven applications.\n",
- "- **Data distillation pipline**: A systematic approach for extracting and refining high-quality reasoning datasets with detailed thought processes from models like DeepSeek R1.\n",
+ "- **Data distillation pipeline**: A systematic approach for extracting and refining high-quality reasoning datasets with detailed thought processes from models like DeepSeek R1.\n",
"- **Hugging Face Integration**: A streamlined process for uploading and sharing distilled datasets on the Hugging Face platform.\n",
"\n"
]
@@ -103,7 +103,7 @@
{
"cell_type": "markdown",
"source": [
- "Firstly, we need to install the camel-ai package for datagen pipline"
+ "Firstly, we need to install the camel-ai package for datagen pipeline"
],
"metadata": {
"id": "RnG_e1QXY8cr"
@@ -246,7 +246,7 @@
{
"cell_type": "markdown",
"source": [
- "After we download these datasets, we will convert these datasets to the desired format which suitable to be used in **CAMEL's data distillation pipline**."
+ "After we download these datasets, we will convert these datasets to the desired format which suitable to be used in **CAMEL's data distillation pipeline**."
],
"metadata": {
"id": "YGQnX7V9biXR"
@@ -502,7 +502,7 @@
{
"cell_type": "markdown",
"source": [
- "Improt required libraries:"
+ "Import required libraries:"
],
"metadata": {
"id": "3Mo66lvra0Of"
@@ -569,7 +569,7 @@
{
"cell_type": "markdown",
"source": [
- "Now we can start to excute CAMEL's STaRPipeline,\n",
+ "Now we can start to execute CAMEL's STaRPipeline,\n",
"pay attention to the parameters setting like problems_path, output_path, max_iterations, rationalization. Some code is commented out since it's **optional**."
],
"metadata": {
@@ -598,7 +598,7 @@
"# Set up reason agent\n",
"reason_agent = ChatAgent(\n",
" system_message=reason_agent_system_message,\n",
- " model=[reason_model_1, reason_model_2], # add models to the list, You can also swtich to other models\n",
+ " model=[reason_model_1, reason_model_2], # add models to the list, You can also switch to other models\n",
")\n",
"\n",
"# # Set up evaluate agent(optional)\n",
diff --git a/docs/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.ipynb b/docs/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.ipynb
index 8bd52e5be..9f256073f 100644
--- a/docs/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.ipynb
+++ b/docs/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.ipynb
@@ -103,7 +103,7 @@
{
"cell_type": "markdown",
"source": [
- "Firstly, we need to install the camel-ai package for datagen pipline"
+ "Firstly, we need to install the camel-ai package for datagen pipeline"
],
"metadata": {
"id": "RnG_e1QXY8cr"
@@ -259,7 +259,7 @@
{
"cell_type": "markdown",
"source": [
- "After we download these datasets, we will convert these datasets to the desired format which suitable to be used in **CAMEL's data distillation pipline**."
+ "After we download these datasets, we will convert these datasets to the desired format which suitable to be used in **CAMEL's data distillation pipeline**."
],
"metadata": {
"id": "YGQnX7V9biXR"
@@ -512,7 +512,7 @@
{
"cell_type": "markdown",
"source": [
- "Improt required libraries:"
+ "Import required libraries:"
],
"metadata": {
"id": "3Mo66lvra0Of"
@@ -588,7 +588,7 @@
{
"cell_type": "markdown",
"source": [
- "Now we can start to excute CAMEL's SelfImprovingCoTPipeline."
+ "Now we can start to execute CAMEL's SelfImprovingCoTPipeline."
],
"metadata": {
"id": "R0TZf3uHhWrQ"
diff --git a/docs/cookbooks/data_generation/self_instruct_data_generation.ipynb b/docs/cookbooks/data_generation/self_instruct_data_generation.ipynb
index 9c7a967fc..6ba238b12 100644
--- a/docs/cookbooks/data_generation/self_instruct_data_generation.ipynb
+++ b/docs/cookbooks/data_generation/self_instruct_data_generation.ipynb
@@ -704,7 +704,7 @@
"source": [
"### Custom Filter Function\n",
"\n",
- "Additionaly, you could implement your own filter function."
+ "Additionally, you could implement your own filter function."
]
},
{
diff --git a/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb b/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
index f6a2ec16a..defa2c990 100644
--- a/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
+++ b/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
@@ -216,7 +216,7 @@
"id": "fwlB09epyeWK"
},
"source": [
- "Step 3: Sumbit one task."
+ "Step 3: Submit one task."
]
},
{
diff --git a/docs/cookbooks/loong/batched_single_step_env.ipynb b/docs/cookbooks/loong/batched_single_step_env.ipynb
index 704c81fa9..144e49d28 100644
--- a/docs/cookbooks/loong/batched_single_step_env.ipynb
+++ b/docs/cookbooks/loong/batched_single_step_env.ipynb
@@ -126,7 +126,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Let's create a Python verifier to later compare answers. Since we are re-using the same extractor from before, the PythonVerifier will expect solutions to be wrapped in `\\boxed{...}`, too."
+ "Let's create a Python verifier to later compare answers. Since we are reusing the same extractor from before, the PythonVerifier will expect solutions to be wrapped in `\\boxed{...}`, too."
]
},
{
@@ -145,7 +145,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Let's now initalize the single step environment with our filtered dataset and our verifier. The verifier will later help with the correctness reward \n",
+ "Let's now initialize the single step environment with our filtered dataset and our verifier. The verifier will later help with the correctness reward \n",
"\n",
"We can then call `env.reset(batch_size=4)` to draw from the initial state distribution (the dataset) and return `batch_size` many observations, which can then be fed into the agent."
]
diff --git a/docs/cookbooks/loong/single_step_env.ipynb b/docs/cookbooks/loong/single_step_env.ipynb
index be511e728..598a1581e 100644
--- a/docs/cookbooks/loong/single_step_env.ipynb
+++ b/docs/cookbooks/loong/single_step_env.ipynb
@@ -124,7 +124,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Let's create a Python verifier to later compare answers. Since we are re-using the same extractor from before, the PythonVerifier will expect solutions to be wrapped in `\\boxed{...}`, too."
+ "Let's create a Python verifier to later compare answers. Since we are reusing the same extractor from before, the PythonVerifier will expect solutions to be wrapped in `\\boxed{...}`, too."
]
},
{
@@ -143,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Let's now initalize the single step environment with our filtered dataset and our verifier. The verifier will later help with the correctness reward \n",
+ "Let's now initialize the single step environment with our filtered dataset and our verifier. The verifier will later help with the correctness reward \n",
"\n",
"We can then call `env.reset()` to draw from the initial state distribution and return an observation, which can then be fed into the agent."
]
diff --git a/docs/key_modules/loaders.md b/docs/key_modules/loaders.md
index 98c50cbc5..98f1b56f7 100644
--- a/docs/key_modules/loaders.md
+++ b/docs/key_modules/loaders.md
@@ -17,7 +17,7 @@ Apify Reader provides a Python interface to interact with the Apify platform for
It includes functionalities for client initialization, actor management, dataset operation.
### 2.4. Chunkr Reader
-Chunkr Reader is a Python client for interacting with the Chunkr API, which processes documents and returns content in various formats. It includes functionalities for client intialization, task management, formating response.
+Chunkr Reader is a Python client for interacting with the Chunkr API, which processes documents and returns content in various formats. It includes functionalities for client initialization, task management, formatting response.
### 2.5. Firecrawl Reader
Firecrawl Reader provides a Python interface to interact with the Firecrawl API, allowing users to turn websites into large language model (LLM)-ready markdown format.
@@ -170,7 +170,7 @@ org is the 1st LLM multi-agent framework and an open-source community dedicated
to finding the scaling law of agents.', 'author': None, 'keywords': None, 'lan
guageCode': 'en', 'openGraph': [{'property': 'og:title', 'content': 'CAMEL-AI'
}, {'property': 'og:description', 'content': 'CAMEL-AI.org is the 1st LLM mult
- i-agent framework and an open-source community dedicated to finding the scalin
+ i-agent framework and an open-source community dedicated to finding the scaling
g law of agents.'}, {'property': 'twitter:title', 'content': 'CAMEL-AI'}, {'pr
operty': 'twitter:description', 'content': 'CAMEL-AI.org is the 1st LLM multi-
agent framework and an open-source community dedicated to finding the scaling
@@ -233,7 +233,7 @@ shared_invite/zt-1vy8u9lbo-ZQmhIAyWSEfSwLCl2r2eKA)
### 3.5. Using `Chunkr Reader`
-Initialize the client and set the local PDF file path, then use the generated task id to featch the output.
+Initialize the client and set the local PDF file path, then use the generated task id to fetch the output.
```python
from camel.loaders import ChunkrReader
@@ -253,7 +253,7 @@ print(task_id)
>>>"7becf001-6f07-4f63-bddf-5633df363bbb"
```
-Featch the output.
+Fetch the output.
```python
task_output = chunkr.get_task_output(
task_id="7becf001-6f07-4f63-bddf-5633df363bbb"
diff --git a/docs/key_modules/models.md b/docs/key_modules/models.md
index d3716f176..c8848d324 100644
--- a/docs/key_modules/models.md
+++ b/docs/key_modules/models.md
@@ -57,7 +57,7 @@ model = ModelFactory.create(
model_config_dict=ChatGPTConfig().as_dict(),
)
-# Define an assitant message
+# Define an assistant message
system_msg = "You are a helpful assistant."
# Initialize the agent
diff --git a/docs/key_modules/prompts.md b/docs/key_modules/prompts.md
index eae552503..c596da075 100644
--- a/docs/key_modules/prompts.md
+++ b/docs/key_modules/prompts.md
@@ -278,7 +278,7 @@ This class defines prompts used in the `AI Society` task with role playing and t
- **GENERATE_ASSISTANTS**: Prompt to list specified number of roles that the AI assistant can play.
- **GENERATE_USERS**: Prompt to list common groups of internet users or occupations.
- **GENERATE_TASKS**: Prompt to list diverse tasks for AI assistants.
-- **TASK_SPECIFY_PROMPT**: Specifies a task in more detail with spcified assistant role and user role.
+- **TASK_SPECIFY_PROMPT**: Specifies a task in more detail with specified assistant role and user role.
- **ASSISTANT_PROMPT**: Rules of the conversation and
instructions for completing tasks.
- **USER_PROMPT**: Rules of the conversation and instructions for giving instructions to the AI assistant.
diff --git a/docs/key_modules/storages.md b/docs/key_modules/storages.md
index 38a38b928..032d2b5f4 100644
--- a/docs/key_modules/storages.md
+++ b/docs/key_modules/storages.md
@@ -71,7 +71,7 @@ Reference: [NebulaGraph](https://www.nebula-graph.io/)
**`Neo4jGraph`**:
-- Description: A concrete implementation of `BaseGraphStorage`, tailored for interacting with Neo4jGraph, one of the most trusted graph databse.
+- Description: A concrete implementation of `BaseGraphStorage`, tailored for interacting with Neo4jGraph, one of the most trusted graph database.
Reference: [Neo4jGraph](https://neo4j.com/)
diff --git a/examples/agent/agent_step_with_reasoning.py b/examples/agent/agent_step_with_reasoning.py
index 7b19230b4..1dcaa298b 100644
--- a/examples/agent/agent_step_with_reasoning.py
+++ b/examples/agent/agent_step_with_reasoning.py
@@ -17,7 +17,7 @@ from camel.types import ModelPlatformType, ModelType
sys_msg = "You are a helpful assistant."
usr_msg = """Who is the best basketball player in the world?
-Tell about his carrer.
+Tell about his career.
"""
openai_model = ModelFactory.create(
diff --git a/examples/benchmarks/apibank.py b/examples/benchmarks/apibank.py
index 71210a159..94d86d474 100644
--- a/examples/benchmarks/apibank.py
+++ b/examples/benchmarks/apibank.py
@@ -43,7 +43,7 @@ level = 'level-1'
# Run the benchmark
result = benchmark.run(agent, level, api_test_enabled=True, subset=10)
-# The following steps are only for demostration purposes,
+# The following steps are only for demonstration purposes,
# they have been integrated into the run method of the benchmark.
# Get the first example of the test data
example_test = list(benchmark._data.items())[0] # type: ignore[assignment] # noqa: RUF015
diff --git a/examples/benchmarks/apibench.py b/examples/benchmarks/apibench.py
index 35866be5a..1839770cd 100644
--- a/examples/benchmarks/apibench.py
+++ b/examples/benchmarks/apibench.py
@@ -34,7 +34,7 @@ result = benchmark.run(agent, subset_name, subset=10)
# Please note that APIBench does not use 'real function call'
# but instead includes API documentation in the questions
-# for the agent to refernce.
+# for the agent to reference.
# An example question including the API documentation is printed below.
print(
"\nExample question including API documentation:\n",
diff --git a/examples/benchmarks/nexus.py b/examples/benchmarks/nexus.py
index 8b5aae363..299d5385d 100644
--- a/examples/benchmarks/nexus.py
+++ b/examples/benchmarks/nexus.py
@@ -30,7 +30,7 @@ benchmark.download()
# Set the task (sub-dataset) to be benchmarked
task = "OTX"
-# Please note that the following step is only for demostration purposes,
+# Please note that the following step is only for demonstration purposes,
# it has been integrated into the run method of the benchmark.
# The tools fetched here are used to construct the prompt for the task,
# which will be passed to the agent for response.
diff --git a/examples/evaluation/single_agent.py b/examples/evaluation/single_agent.py
index d9b49cb66..4d1ef6715 100644
--- a/examples/evaluation/single_agent.py
+++ b/examples/evaluation/single_agent.py
@@ -97,7 +97,7 @@ def main(model=None) -> None:
examples = (
"1. Develop a C++ program that reads a text file line by line and"
"counts the number of occurrences of a specific word in the file.\n"
- "2. Implement a Jave function to find the longest common"
+ "2. Implement a Java function to find the longest common"
" subsequence of two input strings using dynamic programming.\n"
"3. Implement a machine learning-based chatbot system in Python."
)
diff --git a/examples/loaders/apify_example.py b/examples/loaders/apify_example.py
index 26010fff3..83b5a57a4 100644
--- a/examples/loaders/apify_example.py
+++ b/examples/loaders/apify_example.py
@@ -54,7 +54,7 @@ org is the 1st LLM multi-agent framework and an open-source community dedicated
to finding the scaling law of agents.', 'author': None, 'keywords': None, 'lan
guageCode': 'en', 'openGraph': [{'property': 'og:title', 'content': 'CAMEL-AI'
}, {'property': 'og:description', 'content': 'CAMEL-AI.org is the 1st LLM mult
- i-agent framework and an open-source community dedicated to finding the scalin
+ i-agent framework and an open-source community dedicated to finding the scaling
g law of agents.'}, {'property': 'twitter:title', 'content': 'CAMEL-AI'}, {'pr
operty': 'twitter:description', 'content': 'CAMEL-AI.org is the 1st LLM multi-
agent framework and an open-source community dedicated to finding the scaling
diff --git a/examples/models/model_manger.py b/examples/models/model_manger.py
index 9a55ebaa0..a6446e970 100644
--- a/examples/models/model_manger.py
+++ b/examples/models/model_manger.py
@@ -76,7 +76,7 @@ agent_1_response = agent.step(user_msg)
print(agent_1_response.msg.content)
-# Creating a model instance by loading model configs fomr a YAML file.
+# Creating a model instance by loading model configs from a YAML file.
model_inst_from_yaml = ModelFactory.create_from_yaml(
"config_files/config.yaml"
)
diff --git a/examples/models/ollama_model_example.py b/examples/models/ollama_model_example.py
index c14479bcd..5f1be3c65 100644
--- a/examples/models/ollama_model_example.py
+++ b/examples/models/ollama_model_example.py
@@ -69,7 +69,7 @@ class PetList(BaseModel):
ollama_model = ModelFactory.create(
model_platform=ModelPlatformType.OLLAMA,
model_type="llama3.2",
- # Ensure using ollama verison >= 0.5.1 to use structured output feature
+ # Ensure using ollama version >= 0.5.1 to use structured output feature
model_config_dict={"temperature": 0, "response_format": PetList},
)
diff --git a/examples/observability/agentops_track_roleplaying_with_function.py b/examples/observability/agentops_track_roleplaying_with_function.py
index 4570ae4f6..491cbc46b 100644
--- a/examples/observability/agentops_track_roleplaying_with_function.py
+++ b/examples/observability/agentops_track_roleplaying_with_function.py
@@ -27,7 +27,7 @@ from camel.utils import print_text_animated
# Initialize agentops
agentops.init(tags=["CAMEL X AgentOps"])
-# Import toolkits after init of agentops so that the tool useage would be
+# Import toolkits after init of agentops so that the tool usage would be
# tracked
from camel.toolkits import ( # noqa: E402
MathToolkit,
diff --git a/examples/rag/single_agent_with_hybrid_rag.py b/examples/rag/single_agent_with_hybrid_rag.py
index 672fdb0a5..f266c4895 100644
--- a/examples/rag/single_agent_with_hybrid_rag.py
+++ b/examples/rag/single_agent_with_hybrid_rag.py
@@ -34,7 +34,7 @@ def single_agent(query: str) -> str:
bm25_retriever_top_k=10,
)
- # Pass the retrieved infomation to agent
+ # Pass the retrieved information to agent
user_msg = str(retrieved_info)
agent = ChatAgent(assistant_sys_msg)
diff --git a/examples/schema_outputs/outlines_converter_example.py b/examples/schema_outputs/outlines_converter_example.py
index 107473b81..6f3ea599c 100644
--- a/examples/schema_outputs/outlines_converter_example.py
+++ b/examples/schema_outputs/outlines_converter_example.py
@@ -140,7 +140,7 @@ print(output)
"""
-######## Mutliple choices #########
+######## Multiple choices #########
output = model.convert_choice(
"What is the capital of Spain?",
@@ -155,7 +155,7 @@ Madrid
"""
-######## Grammer #########
+######## Grammar #########
arithmetic_grammar = """
?start: expression
diff --git a/examples/toolkits/generate_openai_tool_schema.py b/examples/toolkits/generate_openai_tool_schema.py
index 8603c0149..86a200537 100644
--- a/examples/toolkits/generate_openai_tool_schema.py
+++ b/examples/toolkits/generate_openai_tool_schema.py
@@ -17,7 +17,7 @@ from camel.agents import ChatAgent
from camel.toolkits import FunctionTool
-# Define a function which does't have a docstring
+# Define a function which doesn't have a docstring
def get_perfect_square(n: int) -> int:
return n**2
diff --git a/examples/toolkits/google_scholar_toolkit.py b/examples/toolkits/google_scholar_toolkit.py
index 3e36f3e70..3838d43a0 100644
--- a/examples/toolkits/google_scholar_toolkit.py
+++ b/examples/toolkits/google_scholar_toolkit.py
@@ -72,7 +72,7 @@ citations?view_op=view_photo&user=JicYPdAAAAAJ&citpid=2', 'affiliation':
2022: 104036, 2023: 106452, 2024: 76413}, 'coauthors': [{'container_type':
'Author', 'filled': [], 'scholar_id': 'm1qAiOUAAAAJ', 'source': <AuthorSource.
CO_AUTHORS_LIST: 'CO_AUTHORS_LIST'>, 'name': 'Terrence Sejnowski',
-'affiliation': 'Francis Crick Professor, Salk Institute, Distingished
+'affiliation': 'Francis Crick Professor, Salk Institute, Distinguished
Professor, UC San Diego'}, {'container_type': 'Author', 'filled': [],
'scholar_id': 'RnoIxUwAAAAJ', 'source': <AuthorSource.CO_AUTHORS_LIST:
'CO_AUTHORS_LIST'>, 'name': 'Vinod Nair', 'affiliation': 'Research Scientist,
diff --git a/examples/toolkits/search_toolkit.py b/examples/toolkits/search_toolkit.py
index 243ec4e15..11b38521c 100644
--- a/examples/toolkits/search_toolkit.py
+++ b/examples/toolkits/search_toolkit.py
@@ -92,7 +92,7 @@ conditions in Tokyo.
===============================================================================
"""
search_linkup_response = SearchToolkit().search_linkup(
- query="Can you tell me which women were awared the Physics Nobel Prize",
+ query="Can you tell me which women were awarded the Physics Nobel Prize",
depth="standard",
output_type="searchResults",
)
@@ -169,7 +169,7 @@ within other Nobel Prize categories here'}]}
"""
search_linkup_response = SearchToolkit().search_linkup(
- query="Can you tell me which women were awared the Physics Nobel Prize",
+ query="Can you tell me which women were awarded the Physics Nobel Prize",
depth="standard",
output_type="sourcedAnswer",
)
@@ -203,7 +203,7 @@ class PersonInfo(BaseModel):
search_linkup_response = SearchToolkit().search_linkup(
- query="Can you tell me which women were awared the Physics Nobel Prize",
+ query="Can you tell me which women were awarded the Physics Nobel Prize",
depth="standard",
output_type="structured",
structured_output_schema=PersonInfo,
diff --git a/examples/toolkits/semantic_scholar_toolkit.py b/examples/toolkits/semantic_scholar_toolkit.py
index e03cd6570..a8a8b4864 100644
--- a/examples/toolkits/semantic_scholar_toolkit.py
+++ b/examples/toolkits/semantic_scholar_toolkit.py
@@ -138,7 +138,7 @@ result={'paperId': '649def34f8be52c8b66281af98ae884c09aef38b',
================================================================
'''
-# Search papers thourgh related topic
+# Search papers through related topic
usr_msg = """search 3 papers with topic related to
'generative ai' from 2024 for me"""
camel_agent.reset()
@@ -167,7 +167,7 @@ f0883cd9', 'title': 'A Chitchat on Using ChatGPT for Cheating',
================================================================
'''
-# Search papers through realted topic and operator
+# Search papers through related topic and operator
usr_msg = """search 2 papers with topic related to
'ai and bio' from 2024 for me"""
camel_agent.reset()
@@ -196,7 +196,7 @@ cholar.org/paper/00c8477a9cc28b85e4f6da13d2a889c94a955291',
================================================================
'''
-# Recommand papers thorugh positive and negative paper id
+# Recommend papers through positive and negative paper id
usr_msg = """recommend 2 papers with positive paper id
of "02138d6d094d1e7511c157f0b1a3dd4e5b20ebee",
"018f58247a20ec6b3256fd3119f57980a6f37748" and negative
diff --git a/examples/workforce/hackathon_judges.py b/examples/workforce/hackathon_judges.py
index 708b7c186..54338010a 100644
--- a/examples/workforce/hackathon_judges.py
+++ b/examples/workforce/hackathon_judges.py
@@ -221,7 +221,7 @@ def main():
workforce = Workforce('Hackathon Judges')
task = Task(
content="Evaluate the hackathon project. First, do some research on "
- "the infomation related to the project, then each judge should give a"
+ "the information related to the project, then each judge should give a"
" score accordingly. Finally, list the opinions from each judge while"
" preserving the judge's unique identity, along with the score and"
" judge name, and also give a final summary of the opinions.",
diff --git a/pyproject.toml b/pyproject.toml
index 290bbf29b..8c3726fba 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -514,3 +514,13 @@ module = [
"math_verify.*"
]
ignore_missing_imports = true
+
+[tool.codespell]
+# Ref: https://github.com/codespell-project/codespell#using-a-config-file
+# the .py file needs to be listed twice since pre-commit and codespell treat
+# that path differently.
+skip = '.git*,*.pdf,*.svg,*.lock,*.css,examples/toolkits/semantic_scholar_toolkit.py,./examples/toolkits/semantic_scholar_toolkit.py'
+check-hidden = true
+# Ignore long lines as usually some kind of base64 encodings e.g. in ipynb
+ignore-regex = '^\s*"image/\S+": ".*|^.{300,}|\b(NotIn|Unsupport)\b'
+ignore-words-list = 'ans,datas,rouge'