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

python
def chunk(text: str) -> List[str]

Parameters

ParamField str

No description available.

Returns

ResponseField List[str]

The result of the operation.

Used By

Source

View on GitHub

praisonaiagents/bots/base.py at line 757