pub struct ExampleTool { /* private fields */ }Expand description
Tool that adds few-shot examples to the LLM request.
This is not a callable tool — it modifies the LLM request to include example conversations that guide the model’s behavior.
Implementations§
Source§impl ExampleTool
impl ExampleTool
Sourcepub fn from_provider(provider: &dyn ExampleProvider) -> Self
pub fn from_provider(provider: &dyn ExampleProvider) -> Self
Create from an example provider.
Sourcepub fn process_llm_request(&self, request: &mut LlmRequest)
pub fn process_llm_request(&self, request: &mut LlmRequest)
Add example instructions to the LLM request.
Appends the examples to the system instruction as formatted input/output pairs.
Trait Implementations§
Source§impl Clone for ExampleTool
impl Clone for ExampleTool
Source§fn clone(&self) -> ExampleTool
fn clone(&self) -> ExampleTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExampleTool
impl RefUnwindSafe for ExampleTool
impl Send for ExampleTool
impl Sync for ExampleTool
impl Unpin for ExampleTool
impl UnsafeUnpin for ExampleTool
impl UnwindSafe for ExampleTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more