Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracted RolePlaying to societies subpackage #176

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
import tenacity

from apps.agents.text_utils import split_markdown_code
from camel.agents import RolePlaying, TaskSpecifyAgent
from camel.agents import TaskSpecifyAgent
from camel.messages import AssistantChatMessage
from camel.societies import RolePlaying

REPO_ROOT = os.path.realpath(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "../.."))
Expand Down
2 changes: 0 additions & 2 deletions camel/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from .tool_agents.base import BaseToolAgent
from .tool_agents.hugging_face_tool_agent import HuggingFaceToolAgent
from .embodied_agent import EmbodiedAgent
from .role_playing import RolePlaying

__all__ = [
'BaseAgent',
Expand All @@ -29,5 +28,4 @@
'BaseToolAgent',
'HuggingFaceToolAgent',
'EmbodiedAgent',
'RolePlaying',
]
18 changes: 18 additions & 0 deletions camel/societies/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from .role_playing import RolePlaying

__all__ = [
'RolePlaying',
]
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/ai_society/role_playing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from colorama import Fore

from camel.agents import RolePlaying
from camel.societies import RolePlaying
from camel.utils import print_text_animated


Expand Down
2 changes: 1 addition & 1 deletion examples/ai_society/role_playing_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

from colorama import Fore

from camel.agents import RolePlaying
from camel.configs import ChatGPTConfig
from camel.societies import RolePlaying
from camel.typing import TaskType
from camel.utils import download_tasks

Expand Down
2 changes: 1 addition & 1 deletion examples/ai_society/role_playing_with_critic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from colorama import Fore

from camel.agents import RolePlaying
from camel.configs import ChatGPTConfig
from camel.societies import RolePlaying
from camel.utils import print_text_animated


Expand Down
2 changes: 1 addition & 1 deletion examples/ai_society/role_playing_with_human.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from colorama import Fore

from camel.agents import RolePlaying
from camel.configs import ChatGPTConfig
from camel.societies import RolePlaying
from camel.utils import print_text_animated


Expand Down
2 changes: 1 addition & 1 deletion examples/misalignment/role_playing_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

from colorama import Fore

from camel.agents import RolePlaying
from camel.configs import ChatGPTConfig
from camel.societies import RolePlaying
from camel.typing import TaskType


Expand Down
2 changes: 1 addition & 1 deletion examples/misalignment/role_playing_with_human.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from colorama import Fore

from camel.agents import RolePlaying
from camel.configs import ChatGPTConfig
from camel.societies import RolePlaying
from camel.typing import TaskType
from camel.utils import print_text_animated

Expand Down
3 changes: 2 additions & 1 deletion test/agents/test_role_playing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

import pytest

from camel.agents import ChatAgent, RolePlaying
from camel.agents import ChatAgent
from camel.messages import AssistantChatMessage, ChatMessage, SystemMessageType
from camel.societies import RolePlaying
from camel.typing import ModelType, TaskType


Expand Down