Skip to main content

truncate_context

Function
This function is defined in the rag module.
Truncate context to fit token limit.

Signature

Parameters

&str
required
No description available.
usize
required
No description available.

Returns

String
The result of the operation.

Uses

  • estimate_tokens

Source

View on GitHub

praisonai/src/rag/mod.rs at line 608

Rust Context Management

Rust Token Management