Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev/fix-mod-task'
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-ashkinaze committed Aug 14, 2024
2 parents 2fe6230 + 19970e7 commit d8972fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion plurals/deliberation.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def __init__(
if kwargs is None:
kwargs = {}

if system_instructions is not None:
if "${task}" not in system_instructions:
warnings.warn(
"System instructions usually contain the placeholder ${task} so Moderators know what task it is. Consider adding 'Here is the task: ${task}' to your system instructions.")

# Case 1: if both persona and system_instructions are provided, raise a ValueError
if persona and system_instructions and system_instructions != 'auto':
raise ValueError("Cannot provide both persona and system instructions")
Expand Down Expand Up @@ -684,7 +689,8 @@ def process(self):

# Handle the moderator if present
if self.moderated and self.moderator:
moderated_response = self.moderator._moderate_responses(list(response_dict.values()), self.task)
original_task = self.agents[0].original_task_description
moderated_response = self.moderator._moderate_responses(list(response_dict.values()), original_task)
self.responses.append(moderated_response)
self.final_response = moderated_response
self.final_response = self.responses[-1]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def read_requirements():

setup(
name="plurals",
version="0.2.13",
version="0.2.14",
description="A package supporting pluralistic multi-agent deliberation.",
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit d8972fc

Please sign in to comment.