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
| Name | Type | Description |
|---|
entries | Vec<String> | Context entries |
max_size | usize | Maximum size in characters |
current_size | usize | Current size |
Methods
new
fn new(max_size: usize) -> Self
Create a new fast context
Parameters:
add
fn add(&mut self, content: impl Into<String>) -> ()
Add content to context
Parameters:
| Name | Type |
|---|
content | impl Into<String> |
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
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