mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-12 18:16:43 +00:00
Bugfix - max_answer_chars in write_memory was not using _limit_length
So it couldn't just be -1
This commit is contained in:
1 parent
e316cae5c8
commit
51b2b0cea8
1 file changed
+2
@@ -13,6 +13,8 @@ class WriteMemoryTool(Tool):
|
||||
Write some information about this project that can be useful for future tasks to a memory in md format.
|
||||
The memory name should be meaningful.
|
||||
"""
|
||||
if max_answer_chars == -1:
|
||||
max_answer_chars = self.agent.serena_config.default_max_tool_answer_chars
|
||||
if len(content) > max_answer_chars:
|
||||
raise ValueError(
|
||||
f"Content for {memory_name} is too long. Max length is {max_answer_chars} characters. " + "Please make the content shorter."
|
||||
|
||||
Reference in new issue
Block a user