pub struct VoiceCommandParser { /* private fields */ }Expand description
Voice command parser that uses LLM to interpret natural language commands
Implementations§
Source§impl VoiceCommandParser
impl VoiceCommandParser
Sourcepub fn new(config: IntelligentBehaviorConfig) -> Self
pub fn new(config: IntelligentBehaviorConfig) -> Self
Create a new voice command parser
Sourcepub async fn parse_command(&self, command: &str) -> Result<ParsedCommand>
pub async fn parse_command(&self, command: &str) -> Result<ParsedCommand>
Parse a natural language command into structured API requirements
This method uses the LLM to extract:
- API type (e-commerce, social media, etc.)
- Endpoints and HTTP methods
- Data models and relationships
- Sample data counts
- Business flows (checkout, auth, etc.)
Sourcepub async fn parse_conversational_command(
&self,
command: &str,
context: &ConversationContext,
) -> Result<ParsedCommand>
pub async fn parse_conversational_command( &self, command: &str, context: &ConversationContext, ) -> Result<ParsedCommand>
Parse a conversational command (for multi-turn interactions)
This method parses commands that modify or extend an existing API specification. It takes the current conversation context into account.
Auto Trait Implementations§
impl Freeze for VoiceCommandParser
impl !RefUnwindSafe for VoiceCommandParser
impl Send for VoiceCommandParser
impl Sync for VoiceCommandParser
impl Unpin for VoiceCommandParser
impl !UnwindSafe for VoiceCommandParser
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more