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

release: 0.2.39 (#2100)

Wendong-Fan8870fbc77e6f
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 40782e8bd..bc4b71638 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.38
+ placeholder: E.g., 0.2.39
validations:
required: true
diff --git a/camel/__init__.py b/camel/__init__.py
index 6469c8eaa..49175e8ed 100644
--- a/camel/__init__.py
+++ b/camel/__init__.py
@@ -14,7 +14,7 @@
from camel.logger import disable_logging, enable_logging, set_log_level
-__version__ = '0.2.38'
+__version__ = '0.2.39'
__all__ = [
'__version__',
diff --git a/camel/environments/single_step.py b/camel/environments/single_step.py
index a57648e61..c5ed5729d 100644
--- a/camel/environments/single_step.py
+++ b/camel/environments/single_step.py
@@ -52,7 +52,7 @@ class SingleStepEnv:
question="Episode ended. This is just a placeholder."
)
- ACCURACY_REWARD = 10
+ ACCURACY_REWARD = 1
def __init__(
self,
diff --git a/camel/utils/chunker/code_chunker.py b/camel/utils/chunker/code_chunker.py
index 7d877a13f..bb13b16da 100644
--- a/camel/utils/chunker/code_chunker.py
+++ b/camel/utils/chunker/code_chunker.py
@@ -12,9 +12,10 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
import re
-from typing import List, Optional
+from typing import TYPE_CHECKING, List, Optional
-from unstructured.documents.elements import Element, ElementMetadata
+if TYPE_CHECKING:
+ from unstructured.documents.elements import Element
from camel.utils import get_model_encoding
@@ -23,18 +24,15 @@ from .base import BaseChunker
class CodeChunker(BaseChunker):
r"""A class for chunking code or text while respecting structure
- and token limits.
+ and token limits.
- This class ensures that structured elements such as functions,
- classes, and regions are not arbitrarily split across chunks.
- It also handles oversized lines and Base64-encoded images.
+ This class ensures that structured elements such as functions,
+ classes, and regions are not arbitrarily split across chunks.
+ It also handles oversized lines and Base64-encoded images.
Attributes:
chunk_size (int, optional): The maximum token size per chunk.
(default: :obj:`8192`)
- token_counter (BaseTokenCounter, optional): The tokenizer used for
- token counting, if `None`, OpenAITokenCounter will be used.
- (default: :obj:`None`)
remove_image: (bool, optional): If the chunker should skip the images.
model_name (str, optional): The tokenizer model name used
for token counting. (default: :obj:`"cl100k_base"`)
@@ -108,6 +106,8 @@ class CodeChunker(BaseChunker):
Returns:
List[str]: A list of chunked text segments.
"""
+ from unstructured.documents.elements import Element, ElementMetadata
+
content_str = "\n".join(map(str, content))
chunks = []
current_chunk: list[str] = []
diff --git a/docs/conf.py b/docs/conf.py
index c079d7885..524d67e15 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.38'
+release = '0.2.39'
html_favicon = (
'https://raw.githubusercontent.com/camel-ai/camel/master/misc/favicon.png'
diff --git a/docs/key_modules/loaders.md b/docs/key_modules/loaders.md
index 98f1b56f7..0bdca1bea 100644
--- a/docs/key_modules/loaders.md
+++ b/docs/key_modules/loaders.md
@@ -340,14 +340,14 @@ response = jina_reader.read_content("https://docs.camel-ai.org/")
print(response)
```
```markdown
->>>Welcome to CAMEL’s documentation! — CAMEL 0.2.38 documentation
+>>>Welcome to CAMEL’s documentation! — CAMEL 0.2.39 documentation
===============
[Skip to main content](https://docs.camel-ai.org/#main-content)
Back to top Ctrl+K
- [![Image 1](https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png) ![Image 2](https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png)CAMEL 0.2.38](https://docs.camel-ai.org/#)
+ [![Image 1](https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png) ![Image 2](https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png)CAMEL 0.2.39](https://docs.camel-ai.org/#)
Search Ctrl+K
diff --git a/pyproject.toml b/pyproject.toml
index 8c3726fba..b814eb71e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "camel-ai"
-version = "0.2.38"
+version = "0.2.39"
description = "Communicative Agents for AI Society Study"
authors = [{ name = "CAMEL-AI.org" }]
requires-python = ">=3.10,<3.13"
diff --git a/uv.lock b/uv.lock
index f31500062..75f6635f6 100644
--- a/uv.lock
+++ b/uv.lock
@@ -543,7 +543,7 @@ wheels = [
[[package]]
name = "camel-ai"
-version = "0.2.38"
+version = "0.2.39"
source = { editable = "." }
dependencies = [
{ name = "colorama" },