Skip to content

Commit

Permalink
in agent-structure conflict, use agent for combo instr
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-ashkinaze committed Aug 23, 2024
1 parent 12c8b5e commit 4ba610e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plurals/deliberation.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ def __init__(

def _set_combination_instructions(self) -> None:
"""
Set the combination instructions for agents based on the provided value or the default.
Set the combination instructions for agents based on the provided value or the default. If agents have their own
combination instructions, use those instead.
"""
self.combination_instructions = SmartString(
self.defaults['combination_instructions'].get(
Expand All @@ -339,11 +341,9 @@ def _set_combination_instructions(self) -> None:

for agent in self.agents:
if agent.combination_instructions:
warnings.warn(
"Writing over agent's combination instructions with Chain's combination instructions")
else:
pass
agent.combination_instructions = self.combination_instructions
else:
agent.combination_instructions = self.combination_instructions

def _set_agent_task_description(self) -> None:
"""
Expand Down Expand Up @@ -636,11 +636,11 @@ def process(self):

# Apply the correct prefix and update both lists
if i == 0:
previous_responses_agent1.append(f"[You]: {response}")
previous_responses_agent2.append(f"[Other]: {response}")
previous_responses_agent1.append(f"[WHAT YOU SAID]: {response}")
previous_responses_agent2.append(f"[WHAT OTHER PARTICIPANT SAID]: {response}")
else:
previous_responses_agent2.append(f"[You]: {response}")
previous_responses_agent1.append(f"[Other]: {response}")
previous_responses_agent2.append(f"[WHAT YOU SAID]: {response}")
previous_responses_agent1.append(f"[WHAT OTHER PARTICIPANT SAID]: {response}")

if self.moderated and self.moderator:
moderated_response = self.moderator._moderate_responses(
Expand Down

0 comments on commit 4ba610e

Please sign in to comment.