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

chore: `RolePlaying` add warning for model setting (#974)

Wendong-Fane01356a7ffb0
diff --git a/camel/societies/role_playing.py b/camel/societies/role_playing.py
index 20f72a123..a5c16edbd 100644
--- a/camel/societies/role_playing.py
+++ b/camel/societies/role_playing.py
@@ -11,6 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
+import logging
from typing import Dict, List, Optional, Sequence, Tuple, Union
from camel.agents import (
@@ -27,6 +28,9 @@ from camel.prompts import TextPrompt
from camel.responses import ChatAgentResponse
from camel.types import RoleType, TaskType
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.WARNING)
+
class RolePlaying:
r"""Role playing between two agents.
@@ -97,6 +101,14 @@ class RolePlaying:
extend_task_specify_meta_dict: Optional[Dict] = None,
output_language: Optional[str] = None,
) -> None:
+ if model is not None:
+ logger.warning(
+ "The provided model will override the model settings in "
+ "all agents, including any configurations passed "
+ "through assistant_agent_kwargs, user_agent_kwargs, and "
+ "other agent-specific kwargs."
+ )
+
self.with_task_specify = with_task_specify
self.with_task_planner = with_task_planner
self.with_critic_in_the_loop = with_critic_in_the_loop
diff --git a/poetry.lock b/poetry.lock
index e3c96db9f..79ac73a48 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -9111,4 +9111,4 @@ vector-databases = ["pymilvus", "qdrant-client"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.10.0,<3.12"
-content-hash = "03ee11047eab0683a44a057d74f7eb4f66ab2b2480439f523d2b4d2c9673bbe0"
+content-hash = "62248af424893c44dfd4266a4caf97fefd5a328abbd45e420afecfebf8072946"
diff --git a/pyproject.toml b/pyproject.toml
index e398ede12..099213f26 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -67,7 +67,7 @@ beautifulsoup4 = { version = "^4", optional = true }
docx2txt = { version = "^0.8", optional = true }
PyMuPDF = { version = "^1.22.5", optional = true }
wikipedia = { version = "^1", optional = true }
-duckduckgo-search = { version = "^6.1.0", optional = true }
+duckduckgo-search = { version = "^6.2.12", optional = true }
newspaper3k = { version = "^0.2.8", optional = true }
wolframalpha = { version = "^5.0.0", optional = true }
pyowm = { version = "^3.3.0", optional = true }