Skip to content

Commit e01356a

Browse files
authored
chore: RolePlaying add warning for model setting (#974)
1 parent 859a4e6 commit e01356a

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

camel/societies/role_playing.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14+
import logging
1415
from typing import Dict, List, Optional, Sequence, Tuple, Union
1516

1617
from camel.agents import (
@@ -27,6 +28,9 @@
2728
from camel.responses import ChatAgentResponse
2829
from camel.types import RoleType, TaskType
2930

31+
logger = logging.getLogger(__name__)
32+
logger.setLevel(logging.WARNING)
33+
3034

3135
class RolePlaying:
3236
r"""Role playing between two agents.
@@ -97,6 +101,14 @@ def __init__(
97101
extend_task_specify_meta_dict: Optional[Dict] = None,
98102
output_language: Optional[str] = None,
99103
) -> None:
104+
if model is not None:
105+
logger.warning(
106+
"The provided model will override the model settings in "
107+
"all agents, including any configurations passed "
108+
"through assistant_agent_kwargs, user_agent_kwargs, and "
109+
"other agent-specific kwargs."
110+
)
111+
100112
self.with_task_specify = with_task_specify
101113
self.with_task_planner = with_task_planner
102114
self.with_critic_in_the_loop = with_critic_in_the_loop

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ beautifulsoup4 = { version = "^4", optional = true }
6767
docx2txt = { version = "^0.8", optional = true }
6868
PyMuPDF = { version = "^1.22.5", optional = true }
6969
wikipedia = { version = "^1", optional = true }
70-
duckduckgo-search = { version = "^6.1.0", optional = true }
70+
duckduckgo-search = { version = "^6.2.12", optional = true }
7171
newspaper3k = { version = "^0.2.8", optional = true }
7272
wolframalpha = { version = "^5.0.0", optional = true }
7373
pyowm = { version = "^3.3.0", optional = true }

0 commit comments

Comments
 (0)