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: v0.1.5.4 and update dependency (#688)

Wendong-Fan2bd262dd8f6d
diff --git a/README.md b/README.md
index 443a147af..8b1c9f5d2 100644
--- a/README.md
+++ b/README.md
@@ -110,7 +110,7 @@ conda create --name camel python=3.9
conda activate camel
# Clone github repo
-git clone -b v0.1.5.3 https://github.com/camel-ai/camel.git
+git clone -b v0.1.5.4 https://github.com/camel-ai/camel.git
# Change directory into project directory
cd camel
diff --git a/docs/conf.py b/docs/conf.py
index a15933774..8c44a0179 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -27,7 +27,7 @@ sys.path.insert(0, os.path.abspath('..'))
project = 'CAMEL'
copyright = '2023, CAMEL-AI.org'
author = 'CAMEL-AI.org'
-release = '0.1.5.3'
+release = '0.1.5.4'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
diff --git a/docs/get_started/setup.md b/docs/get_started/setup.md
index 36f84b026..e0dff1be1 100644
--- a/docs/get_started/setup.md
+++ b/docs/get_started/setup.md
@@ -61,7 +61,7 @@ conda create --name camel python=3.10
conda activate camel
# Clone github repo
-git clone -b v0.1.5.3 https://github.com/camel-ai/camel.git
+git clone -b v0.1.5.4 https://github.com/camel-ai/camel.git
# Change directory into project directory
cd camel
diff --git a/examples/bots/discord_bot.py b/examples/bots/discord_bot.py
index a528c047f..25e544ac5 100644
--- a/examples/bots/discord_bot.py
+++ b/examples/bots/discord_bot.py
@@ -186,10 +186,12 @@ if __name__ == "__main__":
)
# Uncommented the folowing code and offer storage information
# for RAG functionality
+
# auto_retriever = AutoRetriever(
- # url_and_api_key=("Your QDRANT URI", "Your QDRANT Token"),
+ # vector_storage_local_path="examples/bots",
# storage_type=StorageType.QDRANT,
# )
+
bot = DiscordBot(
agent,
# auto_retriever=auto_retriever,
diff --git a/examples/function_call/github_examples.py b/examples/function_call/github_examples.py
index b2c1b74f3..f62d9dbe4 100644
--- a/examples/function_call/github_examples.py
+++ b/examples/function_call/github_examples.py
@@ -60,14 +60,19 @@ def write_weekly_pr_summary(repo_name, model=None):
of an open source project {repo_name} on the project's blog.
""",
)
- assistant_model_config = ChatGPTConfig(
- tools=[OpenAIFunction(toolkit.retrieve_pull_requests)],
- temperature=0.0,
+ assistant_model_config_dict = ChatGPTConfig(
+ tools=[OpenAIFunction(toolkit.retrieve_pull_requests)], temperature=0.0
+ ).__dict__
+
+ assistant_model = ModelFactory.create(
+ model_platform=ModelPlatformType.OPENAI,
+ model_type=ModelType.GPT_4O,
+ model_config_dict=assistant_model_config_dict,
)
+
agent = ChatAgent(
assistant_sys_msg,
- model_type=model,
- model_config=assistant_model_config,
+ model=assistant_model,
tools=[OpenAIFunction(toolkit.retrieve_pull_requests)],
)
agent.reset()
@@ -109,15 +114,17 @@ def solve_issue(
content="""You are an experienced software engineer who
specializes on data structures and algorithms tasks.""",
)
- assistant_model_config = ChatGPTConfig(
+ assistant_model_config_dict = ChatGPTConfig(
tools=toolkit.get_tools(),
temperature=0.0,
- )
+ ).__dict__
+
model = ModelFactory.create(
model_platform=ModelPlatformType.OpenAI,
model_type=ModelType.GPT_3_5_TURBO,
- model_config=assistant_model_config,
+ model_config_dict=assistant_model_config_dict,
)
+
agent = ChatAgent(
assistant_sys_msg,
model=model,
diff --git a/examples/function_call/openapi_function.py b/examples/function_call/openapi_function.py
index 6736d6fe4..e3aa227ea 100644
--- a/examples/function_call/openapi_function.py
+++ b/examples/function_call/openapi_function.py
@@ -15,6 +15,8 @@ from camel.agents import ChatAgent
from camel.configs.openai_config import ChatGPTConfig
from camel.functions import OPENAPI_FUNCS
from camel.messages import BaseMessage
+from camel.models import ModelFactory
+from camel.types import ModelPlatformType, ModelType
# Define system message
sys_msg = BaseMessage.make_assistant_message(
@@ -23,14 +25,21 @@ sys_msg = BaseMessage.make_assistant_message(
# Set model config
tools = [*OPENAPI_FUNCS]
-model_config = ChatGPTConfig(
+model_config_dict = ChatGPTConfig(
tools=tools,
temperature=0.0,
+).__dict__
+
+model = ModelFactory.create(
+ model_platform=ModelPlatformType.OPENAI,
+ model_type=ModelType.GPT_4O,
+ model_config_dict=model_config_dict,
)
# Set agent
camel_agent = ChatAgent(
system_message=sys_msg,
+ model=model,
tools=OPENAPI_FUNCS,
)
camel_agent.reset()
diff --git a/examples/vision/video_description.py b/examples/vision/video_description.py
index 6e1657fb2..7b30071b5 100644
--- a/examples/vision/video_description.py
+++ b/examples/vision/video_description.py
@@ -15,8 +15,9 @@
from camel.agents import ChatAgent
from camel.configs.openai_config import ChatGPTConfig
from camel.messages import BaseMessage
+from camel.models import ModelFactory
from camel.prompts.prompt_templates import PromptTemplateGenerator
-from camel.types import ModelType
+from camel.types import ModelPlatformType, ModelType
from camel.types.enums import RoleType, TaskType
# Define system message
@@ -28,17 +29,14 @@ sys_msg = BaseMessage.make_assistant_message(
content=sys_msg_prompt,
)
-# Set model config
-model_config = ChatGPTConfig(
- temperature=0.0,
+model = ModelFactory.create(
+ model_platform=ModelPlatformType.OPENAI,
+ model_type=ModelType.GPT_4O,
+ model_config_dict=ChatGPTConfig().__dict__,
)
# Set agent
-camel_agent = ChatAgent(
- sys_msg,
- model_config=model_config,
- model_type=ModelType.GPT_4O,
-)
+camel_agent = ChatAgent(sys_msg, model=model)
# The video from YouTube can be found at the following link:
# https://www.youtube.com/watch?v=kQ_7GtE529M
diff --git a/poetry.lock b/poetry.lock
index 2ac838ad0..1b252b56b 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -304,6 +304,64 @@ tests = ["attrs[tests-no-zope]", "zope-interface"]
tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"]
tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"]
+[[package]]
+name = "av"
+version = "12.1.0"
+description = "Pythonic bindings for FFmpeg's libraries."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "av-12.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c0df2ad330ccf63ed8192d637306f13123cdf1c06717168d1de8b9a084d62f70"},
+ {file = "av-12.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e66ad48dc3f618cf4a75cc14dd7e119d1151ff3c13b9b064014c79bad20df85"},
+ {file = "av-12.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0e8fbbe3cffd04dcbfaf7f9e0469c8c9d3ae962728487aae0dbbac9ebb62567"},
+ {file = "av-12.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93c24d21b116e3af45e2f4b3a7ff1c96ae9a266bcde33a689ace0c52888e74d9"},
+ {file = "av-12.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1eff59d1eb0ba263e9efe8e460ca239c6ee2285f1b92c6b3c64f002c1b2ffd56"},
+ {file = "av-12.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:09f8bd1fd124e389a266c770d209b5b4333f69c4b5a66b9aa2d09a561b0b54ab"},
+ {file = "av-12.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e4c409639699d75e85a5b4b9fbb0538388bb009c8b426f7976b218731815e645"},
+ {file = "av-12.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f624a61d8062bb7128a4b0af018ef5c7642acff2af7cea1bb6cc5aa663954b77"},
+ {file = "av-12.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:73c61635e959dd50857f1ae3ad28984ce813688262672a5188376686dd293333"},
+ {file = "av-12.1.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f8dcf20ecdfed62cb8b31790d3f394c76f05d5d58d5cc516f7b37c8608b78e2"},
+ {file = "av-12.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebb11aba1ef2acb945713be5f4f7a359439230dc566243c354dddb2b06361367"},
+ {file = "av-12.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:a309994db77f632b606fe22c5bac03302e3dbe48d53c195abc435ccc56192746"},
+ {file = "av-12.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:08401e59a9e33a42511d28cf1fdc570c31d3416426a2d73f4f4aaaaca5945c54"},
+ {file = "av-12.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:efd45e3aa1e478ccbaafd84baf7d95d660b9cef30d850816129fd37d76813589"},
+ {file = "av-12.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ab553ce72c631477181d6c08c6e710afa44fa3452e61b82d9a75be07b1b2fef"},
+ {file = "av-12.1.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:555f3240306ff02169ff209b152f97b071b57957868c3004c65e25c28130d593"},
+ {file = "av-12.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07706499489f2047b54a4675dd04e2cf88322caef904b7b6eb03f480e682cf15"},
+ {file = "av-12.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:f669f5fb2515e9a4c9ee05b24ffbe3168d33c241bda93c84c8e384ca682a5cde"},
+ {file = "av-12.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:876302ee793a457a03c4faa8281012671bb52dec843062bec59d6f0ae3735ba6"},
+ {file = "av-12.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e6ad88e1e61e65c69d92ff1db8826686f913f147b427c99aa3202b027e766128"},
+ {file = "av-12.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:49a8f88b26d3d25140633a8ec48328a9467bbe001d01c54472394484cdb60b10"},
+ {file = "av-12.1.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:97873f344344b9b6aef786b22b57fb42c6eaa4ea0798d2020c5ed061f29ab3d6"},
+ {file = "av-12.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdf4c54354580abbea9390e23a471a346e9a4b4ca19c6929ad11a59d525e2ad3"},
+ {file = "av-12.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:dc1a82e7d43495be6d34b50fd917989a72de7c3a7434d8ec72af0952c1ad4ea3"},
+ {file = "av-12.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:41d13494401bd3968255f7f9af2af203c30b684efc5a7ed92ebe9ec37f9f9264"},
+ {file = "av-12.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc36f7b74e88db8e73fa69dc869331da74abc4f034ecd55f85f6232fcdddca60"},
+ {file = "av-12.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81ff7a43ce921f2cc3c794810b148c4fa2cfd7ff10f4404072c94cf57b39b13d"},
+ {file = "av-12.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce02915698d605c19c372314b7894033a451e838300d0a45c2708a550044e2d1"},
+ {file = "av-12.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eadd5c7c374c9ff889a9116802cdda7ef9d574b623338f4045effc0f3f3c2cbc"},
+ {file = "av-12.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:f32893849fe34300f3cec51c4ae71c45b0acac448d36336d3452a5bb4f7e11bf"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a0a2a8693fdaa3bbb00255cda388f110f7a0b00817470a8cd8f1aa5c8dcbc3c9"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:615f440856cbc5b96b8ae52c75ba722f082b898c3ab837eae024a06a0914e8a6"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:257fe519b0ffb4e900b737515137fb9ae0490edca7d70818b6c71c3cd79994ca"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:04afe8f9005bb42f95717bcfbb22a8950b4b942a862444edb1f0bab71ea702e9"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63cbeaedc0184094b7d36bd4267cd61e6c69c18cb3464cc726ce6a8a438ac87a"},
+ {file = "av-12.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0a0e056baa87037f932d12de3d3f258cbc4284d18d85099ccd845b333ac1bb91"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7d549c2e6e9035022ea2280b781150a8c81acc4a03c69bde20b2f53262041a88"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:3b1e02715cbb985b0efe6b6aaf134f9d1fee760822a07fd19e995a8e461909f4"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b348264ba26152d7b06f2aaf0b2a11c90b13c628a447f6daa2a6770b9443fb0"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c6a3b3e4138cd1977f14e3d16c5f89979de8efa251d7558e2dc10a51cfcc0100"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:105b017958eb5b6a128a5399200a4ec2b1040c2047e0b5f5e3714cd64fe7046e"},
+ {file = "av-12.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:00596e53db3082193142e32fbdf47349724221de117645b0ed8fcaaec508adf4"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed7c48d2d79961d70ea59f44fcff453bb2444a152793f80d2ceaa17af4331b9c"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:d2c486adf83fc5b8e444efcc32f3eef27eefd6d0966ef68607d41205adcd8ec0"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abe9475dd2c8bea47338d5e90d6a45a28930d0fe3820ed2d3d09dfbb3316d476"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0130a8391aa258eee60da3c09d69eb5c9480f14a9f1b1b5312336bac879edd2a"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:669f206cfdd5696d0edf2c81c5d220acc40b4153b71cf6662618c376e00b6d3a"},
+ {file = "av-12.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e322533f585c2e8df07aa708c594fcb67f5f27a2f8b4107a7e6a6f90606190c7"},
+ {file = "av-12.1.0.tar.gz", hash = "sha256:67adab9fdabcb8a86bd542787196580e38ed4132331ee9e82234b23cea9546b3"},
+]
+
[[package]]
name = "babel"
version = "2.15.0"
@@ -2092,7 +2150,7 @@ files = [
name = "imageio"
version = "2.34.2"
description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats."
-optional = true
+optional = false
python-versions = ">=3.8"
files = [
{file = "imageio-2.34.2-py3-none-any.whl", hash = "sha256:a0bb27ec9d5bab36a9f4835e51b21d2cb099e1f78451441f94687ff3404b79f8"},
@@ -2100,6 +2158,7 @@ files = [
]
[package.dependencies]
+av = {version = "*", optional = true, markers = "extra == \"pyav\""}
numpy = "*"
pillow = ">=8.3.2"
@@ -7623,4 +7682,4 @@ vector-databases = ["pymilvus", "qdrant-client"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.9.0,<3.12"
-content-hash = "fbf33ac29e7d72d38745d3a8afe255ed02eca1c917411337429c16cfee9f24af"
+content-hash = "6e1b7b4d4205bce05f51bb436aca9638ebfb9603ef3eefd1fd91452a2e5f1283"
diff --git a/pyproject.toml b/pyproject.toml
index d6b94c56f..b2dd5de62 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "camel-ai"
-version = "0.1.5.3"
+version = "0.1.5.4"
authors = ["CAMEL-AI.org"]
description = "Communicative Agents for AI Society Study"
readme = "README.md"
@@ -71,7 +71,7 @@ unstructured = { extras = ["all-docs"], version = "^0.10.30", optional = true }
slack-sdk = { version = "^3.27.2", optional = true }
pydub = { version = "^0.25.1", optional = true }
pygithub = { version = "^2.3.0", optional = true }
-imageio = { version = "^2.34.1", optional = true }
+imageio = {extras = ["pyav"], version = "^2.34.2"}
pyTelegramBotAPI = { version = "^4.18.0", optional = true }
"discord.py" = { version = "^2.3.2", optional = true }