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

fix: Remove orig_elements in unstructured element metadata (#1118)

Wendong-Fan003f4e36d4d1
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 6ca009015..f3435717d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -26,7 +26,7 @@ body:
attributes:
label: What version of camel are you using?
description: Run command `python3 -c 'print(__import__("camel").__version__)'` in your shell and paste the output here.
- placeholder: E.g., 0.2.4
+ placeholder: E.g., 0.2.5
validations:
required: true
diff --git a/README.md b/README.md
index f55a62305..794b483d7 100644
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ conda create --name camel python=3.10
conda activate camel
# Clone github repo
-git clone -b v0.2.4 https://github.com/camel-ai/camel.git
+git clone -b v0.2.5 https://github.com/camel-ai/camel.git
# Change directory into project directory
cd camel
diff --git a/camel/__init__.py b/camel/__init__.py
index 73a0d72ec..ca65ff1e3 100644
--- a/camel/__init__.py
+++ b/camel/__init__.py
@@ -12,7 +12,7 @@
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
-__version__ = '0.2.4'
+__version__ = '0.2.5'
__all__ = [
'__version__',
diff --git a/camel/retrievers/vector_retriever.py b/camel/retrievers/vector_retriever.py
index a9071248d..a97eeeb03 100644
--- a/camel/retrievers/vector_retriever.py
+++ b/camel/retrievers/vector_retriever.py
@@ -149,7 +149,11 @@ class VectorRetriever(BaseRetriever):
"content path": content.metadata.file_directory
or ""
}
+
chunk_metadata = {"metadata": chunk.metadata.to_dict()}
+ # Remove the 'orig_elements' key if it exists
+ chunk_metadata["metadata"].pop("orig_elements", "")
+
chunk_text = {"text": str(chunk)}
combined_dict = {
**content_path_info,
diff --git a/docs/conf.py b/docs/conf.py
index c5e9672b4..556d2e428 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -27,7 +27,7 @@ sys.path.insert(0, os.path.abspath('..'))
project = 'CAMEL'
copyright = '2024, CAMEL-AI.org'
author = 'CAMEL-AI.org'
-release = '0.2.4'
+release = '0.2.5'
html_favicon = (
'https://raw.githubusercontent.com/camel-ai/camel/master/misc/favicon.png'
diff --git a/docs/cookbooks/agents_message.ipynb b/docs/cookbooks/agents_message.ipynb
index 9f864d557..47f481071 100644
--- a/docs/cookbooks/agents_message.ipynb
+++ b/docs/cookbooks/agents_message.ipynb
@@ -101,7 +101,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/agents_prompting.ipynb b/docs/cookbooks/agents_prompting.ipynb
index 2f1e9daa1..f26fdcd49 100644
--- a/docs/cookbooks/agents_prompting.ipynb
+++ b/docs/cookbooks/agents_prompting.ipynb
@@ -64,7 +64,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/agents_society.ipynb b/docs/cookbooks/agents_society.ipynb
index 677a3c222..a48bf4704 100644
--- a/docs/cookbooks/agents_society.ipynb
+++ b/docs/cookbooks/agents_society.ipynb
@@ -192,7 +192,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/agents_tracking.ipynb b/docs/cookbooks/agents_tracking.ipynb
index 54e9a826a..cc65c9ab6 100644
--- a/docs/cookbooks/agents_tracking.ipynb
+++ b/docs/cookbooks/agents_tracking.ipynb
@@ -64,7 +64,7 @@
},
"outputs": [],
"source": [
- "%pip install camel-ai[all]==0.2.4\n",
+ "%pip install camel-ai[all]==0.2.5\n",
"%pip install agentops==0.3.10"
]
},
diff --git a/docs/cookbooks/agents_with_memory.ipynb b/docs/cookbooks/agents_with_memory.ipynb
index 36ff02aa0..1394e8d90 100644
--- a/docs/cookbooks/agents_with_memory.ipynb
+++ b/docs/cookbooks/agents_with_memory.ipynb
@@ -73,7 +73,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai[all]==0.2.4\""
+ "!pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/agents_with_rag.ipynb b/docs/cookbooks/agents_with_rag.ipynb
index a5dbfda36..539adc221 100644
--- a/docs/cookbooks/agents_with_rag.ipynb
+++ b/docs/cookbooks/agents_with_rag.ipynb
@@ -29,6 +29,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "AwnfLQvMvtXo"
@@ -37,6 +38,7 @@
"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",
"\n",
"4 main parts included:\n",
+ "\n",
"- Customized RAG\n",
"\n",
"- Auto RAG\n",
@@ -73,7 +75,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai[all]==0.2.4\""
+ "!pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/agents_with_tools.ipynb b/docs/cookbooks/agents_with_tools.ipynb
index 27eccee0a..44e974717 100644
--- a/docs/cookbooks/agents_with_tools.ipynb
+++ b/docs/cookbooks/agents_with_tools.ipynb
@@ -77,7 +77,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai[all]==0.2.4\""
+ "!pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/create_your_first_agent.ipynb b/docs/cookbooks/create_your_first_agent.ipynb
index ef93b5e6c..a5e75b4f9 100644
--- a/docs/cookbooks/create_your_first_agent.ipynb
+++ b/docs/cookbooks/create_your_first_agent.ipynb
@@ -83,7 +83,7 @@
{
"cell_type": "code",
"source": [
- "!pip install \"camel-ai[all]==0.2.4\""
+ "!pip install \"camel-ai[all]==0.2.5\""
],
"metadata": {
"id": "UtcC3c-KVZmU"
diff --git a/docs/cookbooks/create_your_first_agents_society.ipynb b/docs/cookbooks/create_your_first_agents_society.ipynb
index 465494d52..d4aa34c2f 100644
--- a/docs/cookbooks/create_your_first_agents_society.ipynb
+++ b/docs/cookbooks/create_your_first_agents_society.ipynb
@@ -77,7 +77,7 @@
{
"cell_type": "code",
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
],
"metadata": {
"id": "RiwfwyyLYYxo"
diff --git a/docs/cookbooks/critic_agents_and_tree_search.ipynb b/docs/cookbooks/critic_agents_and_tree_search.ipynb
index 1b05b72e1..019f89dc2 100644
--- a/docs/cookbooks/critic_agents_and_tree_search.ipynb
+++ b/docs/cookbooks/critic_agents_and_tree_search.ipynb
@@ -84,7 +84,7 @@
{
"cell_type": "code",
"source": [
- "%pip install \"camel-ai==0.2.4\""
+ "%pip install \"camel-ai==0.2.5\""
],
"metadata": {
"id": "UtcC3c-KVZmU"
diff --git a/docs/cookbooks/embodied_agents.ipynb b/docs/cookbooks/embodied_agents.ipynb
index ba22851d3..44b0f7635 100644
--- a/docs/cookbooks/embodied_agents.ipynb
+++ b/docs/cookbooks/embodied_agents.ipynb
@@ -67,7 +67,7 @@
{
"cell_type": "code",
"source": [
- "%pip install \"camel-ai==0.2.4\""
+ "%pip install \"camel-ai==0.2.5\""
],
"metadata": {
"id": "UtcC3c-KVZmU"
diff --git a/docs/cookbooks/knowledge_graph.ipynb b/docs/cookbooks/knowledge_graph.ipynb
index 718cf890c..fac042c03 100644
--- a/docs/cookbooks/knowledge_graph.ipynb
+++ b/docs/cookbooks/knowledge_graph.ipynb
@@ -73,7 +73,7 @@
},
"outputs": [],
"source": [
- "pip install \"camel-ai[all]==0.2.4\""
+ "pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/model_speed_comparison.ipynb b/docs/cookbooks/model_speed_comparison.ipynb
index 3b3aafbb3..b4327df3d 100644
--- a/docs/cookbooks/model_speed_comparison.ipynb
+++ b/docs/cookbooks/model_speed_comparison.ipynb
@@ -63,7 +63,7 @@
{
"cell_type": "code",
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
],
"metadata": {
"id": "UtcC3c-KVZmU"
diff --git a/docs/cookbooks/roleplaying_scraper.ipynb b/docs/cookbooks/roleplaying_scraper.ipynb
index d524a8983..402748658 100644
--- a/docs/cookbooks/roleplaying_scraper.ipynb
+++ b/docs/cookbooks/roleplaying_scraper.ipynb
@@ -89,7 +89,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai[all]==0.2.4\""
+ "!pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/task_generation.ipynb b/docs/cookbooks/task_generation.ipynb
index cac0ea4ff..9989b0d30 100644
--- a/docs/cookbooks/task_generation.ipynb
+++ b/docs/cookbooks/task_generation.ipynb
@@ -62,7 +62,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai==0.2.4\""
+ "!pip install \"camel-ai==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/video_analysis.ipynb b/docs/cookbooks/video_analysis.ipynb
index ee0548e5d..a9e629f0a 100644
--- a/docs/cookbooks/video_analysis.ipynb
+++ b/docs/cookbooks/video_analysis.ipynb
@@ -28,7 +28,7 @@
},
"outputs": [],
"source": [
- "%pip install \"camel-ai[all]==0.2.4\""
+ "%pip install \"camel-ai[all]==0.2.5\""
]
},
{
diff --git a/docs/cookbooks/workforce_judge_committee.ipynb b/docs/cookbooks/workforce_judge_committee.ipynb
index 06678c3a4..b13cdf001 100644
--- a/docs/cookbooks/workforce_judge_committee.ipynb
+++ b/docs/cookbooks/workforce_judge_committee.ipynb
@@ -1,6 +1,7 @@
{
"cells": [
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "k-xIA7Qjuiwu"
@@ -27,10 +28,11 @@
},
"outputs": [],
"source": [
- "%pip install \"camel-ai[all]==0.2.4\""
+ "%pip install \"camel-ai[all]==0.2.5\""
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "mY3G7K9swEzz"
@@ -66,6 +68,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "FIz0b9O_wqkW"
@@ -112,6 +115,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "PnMcEXo_xxGF"
@@ -138,7 +142,7 @@
"from camel.tasks import Task\n",
"from camel.toolkits import FunctionTool, SearchToolkit\n",
"from camel.types import ModelPlatformType, ModelType\n",
- "from camel.workforce import Workforce\n",
+ "from camel.societies.workforce import Workforce\n",
"\n",
"def make_judge(\n",
" persona: str,\n",
@@ -176,6 +180,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "HtP_ej5CyUNT"
@@ -210,6 +215,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "z35CIla3zBF4"
@@ -383,6 +389,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "GG3CR8hX0p5w"
@@ -445,6 +452,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "-WXOG-Hr1ibN"
@@ -479,6 +487,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "HQx4rRNu3CbA"
@@ -657,6 +666,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "Ljbz3Jmc1VwQ"
diff --git a/docs/get_started/installation.md b/docs/get_started/installation.md
index 3c72324ea..c6b09cfaa 100644
--- a/docs/get_started/installation.md
+++ b/docs/get_started/installation.md
@@ -60,7 +60,7 @@ conda create --name camel python=3.10
conda activate camel
# Clone github repo
-git clone -b v0.2.4 https://github.com/camel-ai/camel.git
+git clone -b v0.2.5 https://github.com/camel-ai/camel.git
# Change directory into project directory
cd camel
diff --git a/docs/key_modules/workforce.md b/docs/key_modules/workforce.md
index b5aac4beb..e6517dbd5 100644
--- a/docs/key_modules/workforce.md
+++ b/docs/key_modules/workforce.md
@@ -74,7 +74,7 @@ then add worker nodes to the workforce. Here is an example of how you can do
this:
```python
-from camel.workforce import Workforce
+from camel.societies.workforce import Workforce
# Create a workforce instance
workforce = Workforce("A Simple Workforce")
diff --git a/pyproject.toml b/pyproject.toml
index 63a378532..7093a6101 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "camel-ai"
-version = "0.2.4"
+version = "0.2.5"
authors = ["CAMEL-AI.org"]
description = "Communicative Agents for AI Society Study"
readme = "README.md"