diff --git a/fern/openapi.json b/fern/openapi.json index 0f6ea0a1..35737640 100644 --- a/fern/openapi.json +++ b/fern/openapi.json @@ -33008,6 +33008,8 @@ }, "return_char_limit": { "type": "integer", + "maximum": 1000000, + "minimum": 1, "title": "Return Char Limit", "description": "The maximum number of characters in the response.", "default": 50000 @@ -33497,6 +33499,8 @@ }, "return_char_limit": { "type": "integer", + "maximum": 1000000, + "minimum": 1, "title": "Return Char Limit", "description": "The maximum number of characters in the response.", "default": 50000 @@ -34111,7 +34115,9 @@ "return_char_limit": { "anyOf": [ { - "type": "integer" + "type": "integer", + "maximum": 1000000, + "minimum": 1 }, { "type": "null" @@ -36191,6 +36197,8 @@ }, "return_char_limit": { "type": "integer", + "maximum": 1000000, + "minimum": 1, "title": "Return Char Limit", "description": "The maximum number of characters in the response.", "default": 50000 diff --git a/letta/schemas/tool.py b/letta/schemas/tool.py index fcaa8d33..4c21bb33 100644 --- a/letta/schemas/tool.py +++ b/letta/schemas/tool.py @@ -58,7 +58,12 @@ class Tool(BaseTool): args_json_schema: Optional[Dict] = Field(None, description="The args JSON schema of the function.") # tool configuration - return_char_limit: int = Field(FUNCTION_RETURN_CHAR_LIMIT, description="The maximum number of characters in the response.") + return_char_limit: int = Field( + FUNCTION_RETURN_CHAR_LIMIT, + description="The maximum number of characters in the response.", + ge=1, + le=1_000_000, + ) pip_requirements: list[PipRequirement] | None = Field(None, description="Optional list of pip packages required by this tool.") npm_requirements: list[NpmRequirement] | None = Field(None, description="Optional list of npm packages required by this tool.") default_requires_approval: Optional[bool] = Field( @@ -118,7 +123,12 @@ class ToolCreate(LettaBase): None, description="The JSON schema of the function (auto-generated from source_code if not provided)" ) args_json_schema: Optional[Dict] = Field(None, description="The args JSON schema of the function.") - return_char_limit: int = Field(FUNCTION_RETURN_CHAR_LIMIT, description="The maximum number of characters in the response.") + return_char_limit: int = Field( + FUNCTION_RETURN_CHAR_LIMIT, + description="The maximum number of characters in the response.", + ge=1, + le=1_000_000, + ) pip_requirements: list[PipRequirement] | None = Field(None, description="Optional list of pip packages required by this tool.") npm_requirements: list[NpmRequirement] | None = Field(None, description="Optional list of npm packages required by this tool.") default_requires_approval: Optional[bool] = Field(None, description="Whether or not to require approval before executing this tool.") @@ -175,7 +185,12 @@ class ToolUpdate(LettaBase): None, description="The JSON schema of the function (auto-generated from source_code if not provided)" ) args_json_schema: Optional[Dict] = Field(None, description="The args JSON schema of the function.") - return_char_limit: Optional[int] = Field(None, description="The maximum number of characters in the response.") + return_char_limit: Optional[int] = Field( + None, + description="The maximum number of characters in the response.", + ge=1, + le=1_000_000, + ) pip_requirements: list[PipRequirement] | None = Field(None, description="Optional list of pip packages required by this tool.") npm_requirements: list[NpmRequirement] | None = Field(None, description="Optional list of npm packages required by this tool.") metadata_: Optional[Dict[str, Any]] = Field(None, description="A dictionary of additional metadata for the tool.")