pub enum PromptRender {
Json,
Template {
template: String,
},
}Expand description
Template rendering strategy.
The Template variant performs simple {{key}} string substitution without
introducing heavy dependencies like handlebars or tera. Recognized keys are
documented in the render_envelope implementation:
- All events:
{{event}}/{{cwd}}/{{session_id}} - PreToolUse / Post*:
{{tool}}/{{tool_input}}/{{tool_error}} - UserPromptSubmit:
{{prompt}} - SessionStart:
{{session_source}}
Unrecognized keys are replaced with an empty string (conservative semantics to
avoid sending raw {{...}} to the model when the template is misconfigured).
Variants§
Json
Feeds the JSON-serialized step envelope directly.
Template
Replaces {{key}} placeholders with values from the event fields.
Trait Implementations§
Source§impl Clone for PromptRender
impl Clone for PromptRender
Source§fn clone(&self) -> PromptRender
fn clone(&self) -> PromptRender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptRender
impl Debug for PromptRender
impl Eq for PromptRender
Source§impl PartialEq for PromptRender
impl PartialEq for PromptRender
Source§fn eq(&self, other: &PromptRender) -> bool
fn eq(&self, other: &PromptRender) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PromptRender
Auto Trait Implementations§
impl Freeze for PromptRender
impl RefUnwindSafe for PromptRender
impl Send for PromptRender
impl Sync for PromptRender
impl Unpin for PromptRender
impl UnsafeUnpin for PromptRender
impl UnwindSafe for PromptRender
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