Skip to content

Commit

Permalink
fix: Remove orig_elements in unstructured element metadata (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendong-Fan authored Oct 24, 2024
1 parent e55776e commit 003f4e3
Show file tree
Hide file tree
Showing 25 changed files with 41 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion camel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__',
Expand Down
4 changes: 4 additions & 0 deletions camel/retrievers/vector_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ def process(
"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,
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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'
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_message.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai==0.2.4\""
"!pip install \"camel-ai==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_prompting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai==0.2.4\""
"!pip install \"camel-ai==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_society.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai==0.2.4\""
"!pip install \"camel-ai==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_with_memory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai[all]==0.2.4\""
"!pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion docs/cookbooks/agents_with_rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "AwnfLQvMvtXo"
Expand All @@ -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",
Expand Down Expand Up @@ -73,7 +75,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai[all]==0.2.4\""
"!pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/agents_with_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai[all]==0.2.4\""
"!pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/create_your_first_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/create_your_first_agents_society.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/critic_agents_and_tree_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/embodied_agents.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/knowledge_graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"outputs": [],
"source": [
"pip install \"camel-ai[all]==0.2.4\""
"pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/model_speed_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/roleplaying_scraper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai[all]==0.2.4\""
"!pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/task_generation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"outputs": [],
"source": [
"!pip install \"camel-ai==0.2.4\""
"!pip install \"camel-ai==0.2.5\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbooks/video_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"outputs": [],
"source": [
"%pip install \"camel-ai[all]==0.2.4\""
"%pip install \"camel-ai[all]==0.2.5\""
]
},
{
Expand Down
14 changes: 12 additions & 2 deletions docs/cookbooks/workforce_judge_committee.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "k-xIA7Qjuiwu"
Expand All @@ -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"
Expand Down Expand Up @@ -66,6 +68,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "FIz0b9O_wqkW"
Expand Down Expand Up @@ -112,6 +115,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "PnMcEXo_xxGF"
Expand All @@ -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",
Expand Down Expand Up @@ -176,6 +180,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "HtP_ej5CyUNT"
Expand Down Expand Up @@ -210,6 +215,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "z35CIla3zBF4"
Expand Down Expand Up @@ -383,6 +389,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "GG3CR8hX0p5w"
Expand Down Expand Up @@ -445,6 +452,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "-WXOG-Hr1ibN"
Expand Down Expand Up @@ -479,6 +487,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "HQx4rRNu3CbA"
Expand Down Expand Up @@ -657,6 +666,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "Ljbz3Jmc1VwQ"
Expand Down
2 changes: 1 addition & 1 deletion docs/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/key_modules/workforce.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 003f4e3

Please sign in to comment.