Skip to content

Commit

Permalink
chore: move workforce under society & small doc polish (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendong-Fan authored Oct 24, 2024
1 parent 29f9269 commit e55776e
Show file tree
Hide file tree
Showing 19 changed files with 1,024 additions and 982 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions camel/workforce/base.py → camel/societies/workforce/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from abc import ABC, abstractmethod
from typing import Any

from camel.workforce.task_channel import TaskChannel
from camel.workforce.utils import check_if_running
from camel.societies.workforce.task_channel import TaskChannel
from camel.societies.workforce.utils import check_if_running


class BaseNode(ABC):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
from camel.agents.chat_agent import ChatAgent
from camel.messages.base import BaseMessage
from camel.societies import RolePlaying
from camel.tasks.task import Task, TaskState
from camel.utils import print_text_animated
from camel.workforce.prompts import (
from camel.societies.workforce.prompts import (
ROLEPLAY_PROCESS_TASK_PROMPT,
ROLEPLAY_SUMMARIZE_PROMPT,
)
from camel.workforce.utils import TaskResult
from camel.workforce.worker import Worker
from camel.societies.workforce.utils import TaskResult
from camel.societies.workforce.worker import Worker
from camel.tasks.task import Task, TaskState
from camel.utils import print_text_animated


class RolePlayingWorker(Worker):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

from camel.agents import ChatAgent
from camel.messages.base import BaseMessage
from camel.societies.workforce.prompts import PROCESS_TASK_PROMPT
from camel.societies.workforce.utils import TaskResult
from camel.societies.workforce.worker import Worker
from camel.tasks.task import Task, TaskState
from camel.utils import print_text_animated
from camel.workforce.prompts import PROCESS_TASK_PROMPT
from camel.workforce.utils import TaskResult
from camel.workforce.worker import Worker


class SingleAgentWorker(Worker):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

from colorama import Fore

from camel.societies.workforce.base import BaseNode
from camel.societies.workforce.task_channel import TaskChannel
from camel.societies.workforce.utils import check_if_running
from camel.tasks.task import Task, TaskState
from camel.workforce.base import BaseNode
from camel.workforce.task_channel import TaskChannel
from camel.workforce.utils import check_if_running

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
from camel.configs import ChatGPTConfig
from camel.messages.base import BaseMessage
from camel.models import ModelFactory
from camel.tasks.task import Task, TaskState
from camel.toolkits import SEARCH_FUNCS, WEATHER_FUNCS, GoogleMapsToolkit
from camel.types import ModelPlatformType, ModelType
from camel.workforce.base import BaseNode
from camel.workforce.prompts import (
from camel.societies.workforce.base import BaseNode
from camel.societies.workforce.prompts import (
ASSIGN_TASK_PROMPT,
CREATE_NODE_PROMPT,
WF_TASK_DECOMPOSE_PROMPT,
)
from camel.workforce.role_playing_worker import RolePlayingWorker
from camel.workforce.single_agent_worker import SingleAgentWorker
from camel.workforce.task_channel import TaskChannel
from camel.workforce.utils import (
from camel.societies.workforce.role_playing_worker import RolePlayingWorker
from camel.societies.workforce.single_agent_worker import SingleAgentWorker
from camel.societies.workforce.task_channel import TaskChannel
from camel.societies.workforce.utils import (
TaskAssignResult,
WorkerConf,
check_if_running,
)
from camel.workforce.worker import Worker
from camel.societies.workforce.worker import Worker
from camel.tasks.task import Task, TaskState
from camel.toolkits import SEARCH_FUNCS, WEATHER_FUNCS, GoogleMapsToolkit
from camel.types import ModelPlatformType, ModelType

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion docs/camel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Subpackages
camel.toolkits
camel.types
camel.utils
camel.workforce

Submodules
----------
Expand Down
8 changes: 8 additions & 0 deletions docs/camel.societies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ camel.societies.role\_playing module
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

camel.societies.workforce

Module contents
---------------

Expand Down
36 changes: 18 additions & 18 deletions docs/camel.workforce.rst → docs/camel.societies.workforce.rst
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
camel.workforce package
camel.societies.workforce package
=======================

Submodules
----------

camel.workforce.base module
camel.societies.workforce.base module
---------------------------

.. automodule:: camel.workforce.base
.. automodule:: camel.societies.workforce.base
:members:
:undoc-members:
:show-inheritance:

camel.workforce.prompts module
camel.societies.workforce.prompts module
---------------------------

.. automodule:: camel.workforce.prompts
.. automodule:: camel.societies.workforce.prompts
:members:
:undoc-members:
:show-inheritance:

camel.workforce.role\_playing\_worker module
camel.societies.workforce.role\_playing\_worker module
------------------------------------

.. automodule:: camel.workforce.role_playing_worker
.. automodule:: camel.societies.workforce.role_playing_worker
:members:
:undoc-members:
:show-inheritance:

camel.workforce.single\_agent\_worker module
camel.societies.workforce.single\_agent\_worker module
------------------------------------------

.. automodule:: camel.workforce.single_agent_worker
.. automodule:: camel.societies.workforce.single_agent_worker
:members:
:undoc-members:
:show-inheritance:

camel.workforce.task\_channel module
camel.societies.workforce.task\_channel module
------------------------------------------

.. automodule:: camel.workforce.task_channel
.. automodule:: camel.societies.workforce.task_channel
:members:
:undoc-members:
:show-inheritance:

camel.workforce.utils module
camel.societies.workforce.utils module
----------------------------

.. automodule:: camel.workforce.utils
.. automodule:: camel.societies.workforce.utils
:members:
:undoc-members:
:show-inheritance:

camel.workforce.worker module
camel.societies.workforce.worker module
-----------------------------------

.. automodule:: camel.workforce.worker
.. automodule:: camel.societies.workforce.worker
:members:
:undoc-members:
:show-inheritance:

camel.workforce.workforce module
camel.societies.workforce.workforce module
--------------------------------

.. automodule:: camel.workforce.workforce
.. automodule:: camel.societies.workforce.workforce
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: camel.workforce
.. automodule:: camel.societies.workforce
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit e55776e

Please sign in to comment.