Skip to content

Commit

Permalink
release: v0.1.5.4 and update dependency (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendong-Fan authored Jun 27, 2024
1 parent 8d8bebd commit 2bd262d
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 = '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
Expand Down
2 changes: 1 addition & 1 deletion docs/get_started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion examples/bots/discord_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,12 @@ async def on_message(self, message: 'Message') -> None:
)
# 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,
Expand Down
23 changes: 15 additions & 8 deletions examples/function_call/github_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 10 additions & 1 deletion examples/function_call/openapi_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
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(
Expand All @@ -23,14 +25,21 @@

# 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()
Expand Down
16 changes: 7 additions & 9 deletions examples/vision/video_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,17 +29,14 @@
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
Expand Down
63 changes: 61 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 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.1.5.3"
version = "0.1.5.4"
authors = ["CAMEL-AI.org"]
description = "Communicative Agents for AI Society Study"
readme = "README.md"
Expand Down Expand Up @@ -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 }

Expand Down

0 comments on commit 2bd262d

Please sign in to comment.