Skip to content

Commit

Permalink
Fix agent relationship bug. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
d42me authored Nov 29, 2023
1 parent e125fe5 commit c356029
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="simulatrex",
version="0.0.4.0",
version="0.0.4.1",
author="Dominik Scherm",
author_email="me@dominikscherm.de",
description="LLM-based simulation framework",
Expand Down
9 changes: 6 additions & 3 deletions src/simulatrex/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,22 @@ async def _decide_on_converse(
for thought in last_thoughts:
agent_thoughts.append(thought.content)

agent_relationships: List[AgentRelationship] = []
agent_relationships: List[str] = []
for relationship in self.relationships:
agent_relationships.append(relationship.summary())

if agent_relationships:
_agent_relationships_summary = "; ".join(
[str(r) for r in agent_relationships]
)
_logger.info(
f"Relationships found for the agent: {[r.summary() for r in agent_relationships]}"
f"Relationships found for the agent: {_agent_relationships_summary}"
)
prompt = PromptManager().get_filled_template(
TemplateType.AGENT_DECIDE_ON_CONVERSATION,
agent_name=self.identity.name,
agent_thoughts=agent_thoughts,
agent_relationships=agent_relationships,
agent_relationships=_agent_relationships_summary,
environment=environment,
)

Expand Down

0 comments on commit c356029

Please sign in to comment.