diff --git a/letta/constants.py b/letta/constants.py index acaaca2c..ea42306a 100644 --- a/letta/constants.py +++ b/letta/constants.py @@ -150,6 +150,7 @@ CORE_MEMORY_BLOCK_CHAR_LIMIT: int = 5000 # Function return limits FUNCTION_RETURN_CHAR_LIMIT = 6000 # ~300 words +BASE_FUNCTION_RETURN_CHAR_LIMIT = 1000000 # very high (we rely on implementation) MAX_PAUSE_HEARTBEATS = 360 # in min diff --git a/letta/services/tool_manager.py b/letta/services/tool_manager.py index 2e831f92..0aa08206 100644 --- a/letta/services/tool_manager.py +++ b/letta/services/tool_manager.py @@ -2,7 +2,7 @@ import importlib import warnings from typing import List, Optional -from letta.constants import BASE_MEMORY_TOOLS, BASE_TOOLS, MULTI_AGENT_TOOLS +from letta.constants import BASE_FUNCTION_RETURN_CHAR_LIMIT, BASE_MEMORY_TOOLS, BASE_TOOLS, MULTI_AGENT_TOOLS from letta.functions.functions import derive_openai_json_schema, load_function_set from letta.log import get_logger from letta.orm.enums import ToolType @@ -200,6 +200,7 @@ class ToolManager: tags=tags, source_type="python", tool_type=tool_type, + return_char_limit=BASE_FUNCTION_RETURN_CHAR_LIMIT, ), actor=actor, )