pub enum BeforeInferenceAction {
AddSystemContext(String),
AddSessionContext(String),
ExcludeTool(String),
IncludeOnlyTools(Vec<String>),
AddRequestTransform(Arc<dyn InferenceRequestTransform>),
Terminate(TerminationReason),
State(AnyStateAction),
}Expand description
Actions valid in BeforeInference.
Variants§
AddSystemContext(String)
Append a system-prompt context block.
AddSessionContext(String)
Append a session message.
ExcludeTool(String)
Remove one tool by id.
IncludeOnlyTools(Vec<String>)
Keep only the listed tool ids.
AddRequestTransform(Arc<dyn InferenceRequestTransform>)
Register a request transform applied after messages are assembled.
Terminate(TerminationReason)
Request run termination before inference fires.
State(AnyStateAction)
Emit a persistent state change.
Trait Implementations§
Source§impl From<AnyStateAction> for BeforeInferenceAction
impl From<AnyStateAction> for BeforeInferenceAction
Source§fn from(sa: AnyStateAction) -> Self
fn from(sa: AnyStateAction) -> Self
Converts to this type from the input type.
Source§impl From<BeforeInferenceAction> for ActionSet<BeforeInferenceAction>
impl From<BeforeInferenceAction> for ActionSet<BeforeInferenceAction>
Source§fn from(a: BeforeInferenceAction) -> Self
fn from(a: BeforeInferenceAction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BeforeInferenceAction
impl !RefUnwindSafe for BeforeInferenceAction
impl Send for BeforeInferenceAction
impl !Sync for BeforeInferenceAction
impl Unpin for BeforeInferenceAction
impl UnsafeUnpin for BeforeInferenceAction
impl !UnwindSafe for BeforeInferenceAction
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