pub struct NaturalLanguageEngine { /* private fields */ }Expand description
Natural language workflow creation engine. Note: actual NL parsing delegates to LLM (per CLAUDE.md no-hardcoded-intelligence rule).
Implementations§
Source§impl NaturalLanguageEngine
impl NaturalLanguageEngine
pub fn new() -> Self
Sourcepub fn create_request(&mut self, description: &str) -> usize
pub fn create_request(&mut self, description: &str) -> usize
Start a natural language workflow request.
Sourcepub fn add_clarification(
&mut self,
request_idx: usize,
question: &str,
options: Option<Vec<String>>,
) -> WorkflowResult<()>
pub fn add_clarification( &mut self, request_idx: usize, question: &str, options: Option<Vec<String>>, ) -> WorkflowResult<()>
Add a clarification question.
Sourcepub fn answer_clarification(
&mut self,
request_idx: usize,
clarification_idx: usize,
answer: &str,
) -> WorkflowResult<()>
pub fn answer_clarification( &mut self, request_idx: usize, clarification_idx: usize, answer: &str, ) -> WorkflowResult<()>
Answer a clarification question.
Sourcepub fn set_synthesized(
&mut self,
request_idx: usize,
workflow: Value,
) -> WorkflowResult<()>
pub fn set_synthesized( &mut self, request_idx: usize, workflow: Value, ) -> WorkflowResult<()>
Set the synthesized workflow (produced by LLM).
Sourcepub fn get_request(&self, request_idx: usize) -> Option<&NaturalLanguageRequest>
pub fn get_request(&self, request_idx: usize) -> Option<&NaturalLanguageRequest>
Get a request.
Sourcepub fn list_requests(&self) -> &[NaturalLanguageRequest]
pub fn list_requests(&self) -> &[NaturalLanguageRequest]
Get all requests.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NaturalLanguageEngine
impl RefUnwindSafe for NaturalLanguageEngine
impl Send for NaturalLanguageEngine
impl Sync for NaturalLanguageEngine
impl Unpin for NaturalLanguageEngine
impl UnsafeUnpin for NaturalLanguageEngine
impl UnwindSafe for NaturalLanguageEngine
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