Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Strip spaces from the end of truncated ai_name in log_cycle.py (#4672)

Reinier van der Leerf277e6aa2dcc
diff --git a/autogpt/log_cycle/log_cycle.py b/autogpt/log_cycle/log_cycle.py
index 71aecda85a..ebceb57ef7 100644
--- a/autogpt/log_cycle/log_cycle.py
+++ b/autogpt/log_cycle/log_cycle.py
@@ -43,7 +43,7 @@ class LogCycleHandler:
return outer_folder_path
def get_agent_short_name(self, ai_name):
- return ai_name[:15] if ai_name else DEFAULT_PREFIX
+ return ai_name[:15].rstrip() if ai_name else DEFAULT_PREFIX
def create_inner_directory(self, outer_folder_path: str, cycle_count: int) -> str:
nested_folder_name = str(cycle_count).zfill(3)