pub struct ScriptedExtractor { /* private fields */ }Expand description
LLM extractor that pops pre-scripted results in FIFO order and counts
invocations. When the script is exhausted, subsequent calls return an empty
Vec (mirroring a provider that simply finds no facts) rather than
erroring, so tests that do not care about the Nth call still pass.
Implementations§
Source§impl ScriptedExtractor
impl ScriptedExtractor
pub fn new(results: Vec<Result<Vec<String>, ProviderError>>) -> Self
pub fn call_count(&self) -> u32
Trait Implementations§
Source§impl LlmExtractor for ScriptedExtractor
impl LlmExtractor for ScriptedExtractor
Source§async fn extract_facts(
&self,
_content: &str,
_tool_calls: &[ToolCall],
) -> Result<Vec<String>, ProviderError>
async fn extract_facts( &self, _content: &str, _tool_calls: &[ToolCall], ) -> Result<Vec<String>, ProviderError>
Extract zero or more canonical-English fact strings from an assistant
response.
response_content is the combined extraction input (assistant
text + formatted tool calls); tool_calls is the raw structured calls
for adapters that prefer to handle them directly.Auto Trait Implementations§
impl !Freeze for ScriptedExtractor
impl RefUnwindSafe for ScriptedExtractor
impl Send for ScriptedExtractor
impl Sync for ScriptedExtractor
impl Unpin for ScriptedExtractor
impl UnsafeUnpin for ScriptedExtractor
impl UnwindSafe for ScriptedExtractor
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