Skip to main content

Module injection

Module injection 

Source
Expand description

Context injection: the configuration shared by the ContextInjector plugin and the MemoryManager’s injection, and the crate-internal engine that folds text into the latest user message before a model call.

Structs§

InjectionConfig
Configuration common to every injection consumer: when to inject (InjectionConfig).
InjectionConfigBuilder
Use builder syntax to set the inputs and finish with build().
InjectionContext
What an injection consumer receives on each model call (InjectionContext): passed to the render callback and to a predicate trigger.
RenderContent
The callback that renders the text to inject (renderContent): Ok(None) or blank text skips the call, and an error fails open (logged, injection skipped).

Enums§

InjectionTrigger
When injection runs before a model call (InjectionTrigger, plus the predicate form of InjectionConfig.trigger).