new • Rust AI Agent SDK

new: Create a new context segment

new

Method

</div>

This is a method of the ContextSegment class in the context module.

Create a new context segment

Signature

python
def new(name: impl Into<String>, tokens: usize) -> Self

Parameters

ParamField impl Into&lt;String&gt;

No description available.

ParamField usize

No description available.

Returns

ResponseField Self

The result of the operation.