chunk • AI Agent SDK
chunk: Split *text* to respect the platform max length.
chunk
Method
</div>
This is a method of the BasePlatformAdapter class in the base module.
Split text to respect the platform max length.
Default uses a paragraph/line-aware splitter. Override to use a richer platform-aware chunker (e.g. code-fence preserving).
Signature
def chunk(text: str) -> List[str]Parameters
ParamField
strNo description available.
Returns
ResponseField
List[str]The result of the operation.
Used By
Source
View on GitHubpraisonaiagents/bots/base.py at line 757