Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

FastContext

Defined in the specialized module.
Rust AI Agent SDK Fast context for efficient context management

Fields

NameTypeDescription
entriesVec<String>Context entries
max_sizeusizeMaximum size in characters
current_sizeusizeCurrent size

Methods

new

fn new(max_size: usize) -> Self
Create a new fast context Parameters:
NameType
max_sizeusize

add

fn add(&mut self, content: impl Into<String>) -> ()
Add content to context Parameters:
NameType
contentimpl Into&lt;String&gt;

get

fn get(&self) -> &[String]
Get all context

as_string

fn as_string(&self) -> String
Get context as single string

clear

fn clear(&mut self) -> ()
Clear context

size

fn size(&self) -> usize
Get current size

is_empty

fn is_empty(&self) -> bool
Check if empty

Source

View on GitHub

praisonai/src/parity/specialized.rs at line 279

Rust Context Management

Rust Token Management