aboutsummaryrefslogtreecommitdiff
path: root/autogpts/autogpt/autogpt/components/event_history.py
diff options
context:
space:
mode:
Diffstat (limited to 'autogpts/autogpt/autogpt/components/event_history.py')
-rw-r--r--autogpts/autogpt/autogpt/components/event_history.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/autogpts/autogpt/autogpt/components/event_history.py b/autogpts/autogpt/autogpt/components/event_history.py
index 5de1926f4..a66b18e2d 100644
--- a/autogpts/autogpt/autogpt/components/event_history.py
+++ b/autogpts/autogpt/autogpt/components/event_history.py
@@ -34,13 +34,12 @@ class EventHistoryComponent(MessageProvider, AfterParse, AfterExecute):
self.llm_provider = llm_provider
def get_messages(self) -> Iterator[ChatMessage]:
- yield ChatMessage.system(
- self._compile_progress(
- self.event_history.episodes,
- self.max_tokens,
- self.count_tokens,
- )
- )
+ if progress := self._compile_progress(
+ self.event_history.episodes,
+ self.max_tokens,
+ self.count_tokens,
+ ):
+ yield ChatMessage.system(f"## Progress on your Task so far\n\n{progress}")
def after_parse(self, result: ThoughtProcessOutput) -> None:
if result.command_name: