Skip to content

Commit 2bd262d

Browse files
authored
release: v0.1.5.4 and update dependency (#688)
1 parent 8d8bebd commit 2bd262d

File tree

9 files changed

+101
-26
lines changed

9 files changed

+101
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ conda create --name camel python=3.9
110110
conda activate camel
111111
112112
# Clone github repo
113-
git clone -b v0.1.5.3 https://github.com/camel-ai/camel.git
113+
git clone -b v0.1.5.4 https://github.com/camel-ai/camel.git
114114
115115
# Change directory into project directory
116116
cd camel

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
project = 'CAMEL'
2828
copyright = '2023, CAMEL-AI.org'
2929
author = 'CAMEL-AI.org'
30-
release = '0.1.5.3'
30+
release = '0.1.5.4'
3131

3232
# -- General configuration ---------------------------------------------------
3333
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/get_started/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ conda create --name camel python=3.10
6161
conda activate camel
6262
6363
# Clone github repo
64-
git clone -b v0.1.5.3 https://github.com/camel-ai/camel.git
64+
git clone -b v0.1.5.4 https://github.com/camel-ai/camel.git
6565
6666
# Change directory into project directory
6767
cd camel

examples/bots/discord_bot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,12 @@ async def on_message(self, message: 'Message') -> None:
186186
)
187187
# Uncommented the folowing code and offer storage information
188188
# for RAG functionality
189+
189190
# auto_retriever = AutoRetriever(
190-
# url_and_api_key=("Your QDRANT URI", "Your QDRANT Token"),
191+
# vector_storage_local_path="examples/bots",
191192
# storage_type=StorageType.QDRANT,
192193
# )
194+
193195
bot = DiscordBot(
194196
agent,
195197
# auto_retriever=auto_retriever,

examples/function_call/github_examples.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,19 @@ def write_weekly_pr_summary(repo_name, model=None):
6060
of an open source project {repo_name} on the project's blog.
6161
""",
6262
)
63-
assistant_model_config = ChatGPTConfig(
64-
tools=[OpenAIFunction(toolkit.retrieve_pull_requests)],
65-
temperature=0.0,
63+
assistant_model_config_dict = ChatGPTConfig(
64+
tools=[OpenAIFunction(toolkit.retrieve_pull_requests)], temperature=0.0
65+
).__dict__
66+
67+
assistant_model = ModelFactory.create(
68+
model_platform=ModelPlatformType.OPENAI,
69+
model_type=ModelType.GPT_4O,
70+
model_config_dict=assistant_model_config_dict,
6671
)
72+
6773
agent = ChatAgent(
6874
assistant_sys_msg,
69-
model_type=model,
70-
model_config=assistant_model_config,
75+
model=assistant_model,
7176
tools=[OpenAIFunction(toolkit.retrieve_pull_requests)],
7277
)
7378
agent.reset()
@@ -109,15 +114,17 @@ def solve_issue(
109114
content="""You are an experienced software engineer who
110115
specializes on data structures and algorithms tasks.""",
111116
)
112-
assistant_model_config = ChatGPTConfig(
117+
assistant_model_config_dict = ChatGPTConfig(
113118
tools=toolkit.get_tools(),
114119
temperature=0.0,
115-
)
120+
).__dict__
121+
116122
model = ModelFactory.create(
117123
model_platform=ModelPlatformType.OpenAI,
118124
model_type=ModelType.GPT_3_5_TURBO,
119-
model_config=assistant_model_config,
125+
model_config_dict=assistant_model_config_dict,
120126
)
127+
121128
agent = ChatAgent(
122129
assistant_sys_msg,
123130
model=model,

examples/function_call/openapi_function.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
from camel.configs.openai_config import ChatGPTConfig
1616
from camel.functions import OPENAPI_FUNCS
1717
from camel.messages import BaseMessage
18+
from camel.models import ModelFactory
19+
from camel.types import ModelPlatformType, ModelType
1820

1921
# Define system message
2022
sys_msg = BaseMessage.make_assistant_message(
@@ -23,14 +25,21 @@
2325

2426
# Set model config
2527
tools = [*OPENAPI_FUNCS]
26-
model_config = ChatGPTConfig(
28+
model_config_dict = ChatGPTConfig(
2729
tools=tools,
2830
temperature=0.0,
31+
).__dict__
32+
33+
model = ModelFactory.create(
34+
model_platform=ModelPlatformType.OPENAI,
35+
model_type=ModelType.GPT_4O,
36+
model_config_dict=model_config_dict,
2937
)
3038

3139
# Set agent
3240
camel_agent = ChatAgent(
3341
system_message=sys_msg,
42+
model=model,
3443
tools=OPENAPI_FUNCS,
3544
)
3645
camel_agent.reset()

examples/vision/video_description.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
from camel.agents import ChatAgent
1616
from camel.configs.openai_config import ChatGPTConfig
1717
from camel.messages import BaseMessage
18+
from camel.models import ModelFactory
1819
from camel.prompts.prompt_templates import PromptTemplateGenerator
19-
from camel.types import ModelType
20+
from camel.types import ModelPlatformType, ModelType
2021
from camel.types.enums import RoleType, TaskType
2122

2223
# Define system message
@@ -28,17 +29,14 @@
2829
content=sys_msg_prompt,
2930
)
3031

31-
# Set model config
32-
model_config = ChatGPTConfig(
33-
temperature=0.0,
32+
model = ModelFactory.create(
33+
model_platform=ModelPlatformType.OPENAI,
34+
model_type=ModelType.GPT_4O,
35+
model_config_dict=ChatGPTConfig().__dict__,
3436
)
3537

3638
# Set agent
37-
camel_agent = ChatAgent(
38-
sys_msg,
39-
model_config=model_config,
40-
model_type=ModelType.GPT_4O,
41-
)
39+
camel_agent = ChatAgent(sys_msg, model=model)
4240

4341
# The video from YouTube can be found at the following link:
4442
# https://www.youtube.com/watch?v=kQ_7GtE529M

poetry.lock

Lines changed: 61 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "camel-ai"
7-
version = "0.1.5.3"
7+
version = "0.1.5.4"
88
authors = ["CAMEL-AI.org"]
99
description = "Communicative Agents for AI Society Study"
1010
readme = "README.md"
@@ -71,7 +71,7 @@ unstructured = { extras = ["all-docs"], version = "^0.10.30", optional = true }
7171
slack-sdk = { version = "^3.27.2", optional = true }
7272
pydub = { version = "^0.25.1", optional = true }
7373
pygithub = { version = "^2.3.0", optional = true }
74-
imageio = { version = "^2.34.1", optional = true }
74+
imageio = {extras = ["pyav"], version = "^2.34.2"}
7575
pyTelegramBotAPI = { version = "^4.18.0", optional = true }
7676
"discord.py" = { version = "^2.3.2", optional = true }
7777

0 commit comments

Comments
 (0)