Skip to main content

truncate_context

Method
This is a method of the RAG class in the rag module.
Truncate context to fit token budget

Signature

def truncate_context(&self, context: &str, max_tokens: usize) -> String

Parameters

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

Returns

Returns
String
The result of the operation.