diff --git a/concordia/associative_memory/formative_memories.py b/concordia/associative_memory/formative_memories.py index 9cd1301b..b7d60bc8 100644 --- a/concordia/associative_memory/formative_memories.py +++ b/concordia/associative_memory/formative_memories.py @@ -112,8 +112,8 @@ def make_backstory( question += f'Take into account the following context: {context}' result = prompt.open_question( question, - max_characters=4000, - max_tokens=4000, + max_characters=3500, + max_tokens=3500, terminators=[], ) result = re.sub(r'\.\s', '.\n', result) @@ -204,8 +204,8 @@ def add_memories( episode = prompt.open_question( question, - max_characters=4000, - max_tokens=4000, + max_characters=3500, + max_tokens=3500, terminators=[], ) memory.add( diff --git a/concordia/components/agent/reflection.py b/concordia/components/agent/reflection.py index 823c3435..033e1bdb 100644 --- a/concordia/components/agent/reflection.py +++ b/concordia/components/agent/reflection.py @@ -83,7 +83,7 @@ def update(self) -> None: f' answer about {self._agent_name}?' ), ]), - max_characters=4000, + max_characters=3500, max_tokens=5000, terminators=(), ) @@ -105,7 +105,7 @@ def update(self) -> None: ' statements?' ), ]), - max_characters=4000, + max_characters=3500, max_tokens=5000, terminators=(), ) diff --git a/examples/cyberball/cyberball.ipynb b/examples/cyberball/cyberball.ipynb index f3e45d7c..59662b21 100644 --- a/examples/cyberball/cyberball.ipynb +++ b/examples/cyberball/cyberball.ipynb @@ -764,7 +764,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -788,7 +788,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n", diff --git a/examples/magic_beans_for_sale.ipynb b/examples/magic_beans_for_sale.ipynb index 03f3da10..dd7efa81 100644 --- a/examples/magic_beans_for_sale.ipynb +++ b/examples/magic_beans_for_sale.ipynb @@ -722,7 +722,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -746,7 +746,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n", diff --git a/examples/phone/calendar.ipynb b/examples/phone/calendar.ipynb index 17d34a31..21dd0fff 100644 --- a/examples/phone/calendar.ipynb +++ b/examples/phone/calendar.ipynb @@ -536,7 +536,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -559,7 +559,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n", diff --git a/examples/three_key_questions.ipynb b/examples/three_key_questions.ipynb index a2d6482a..16f2869e 100644 --- a/examples/three_key_questions.ipynb +++ b/examples/three_key_questions.ipynb @@ -671,7 +671,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -695,7 +695,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n", diff --git a/examples/village/day_in_riverbend.ipynb b/examples/village/day_in_riverbend.ipynb index 2a3e0ef9..3f3ed64c 100644 --- a/examples/village/day_in_riverbend.ipynb +++ b/examples/village/day_in_riverbend.ipynb @@ -693,7 +693,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -716,7 +716,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n", diff --git a/examples/village/riverbend_elections.ipynb b/examples/village/riverbend_elections.ipynb index 44c0fb7e..396dd8d1 100644 --- a/examples/village/riverbend_elections.ipynb +++ b/examples/village/riverbend_elections.ipynb @@ -773,7 +773,7 @@ " f'Sequence of events:\\n{detailed_story}'+\n", " '\\nNarratively summarize the above temporally ordered ' +\n", " 'sequence of events. Write it as a news report. Summary:\\n',\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "print(episode_summary)" ] }, @@ -797,7 +797,7 @@ " f'Sequence of events that happened to {name}:\\n{detailed_story}'\n", " '\\nWrite a short story that summarises these events.\\n'\n", " ,\n", - " max_characters=4000, max_tokens=4000, terminators=())\n", + " max_characters=3500, max_tokens=3500, terminators=())\n", "\n", " all_player_mem = player._memory.retrieve_recent(k=1000, add_time=True)\n", " all_player_mem = ['Summary:', summary, 'Memories:'] + all_player_mem\n",