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.
Sourcepub async fn parse_workspace_scenario_command(
&self,
command: &str,
) -> Result<ParsedWorkspaceScenario>
pub async fn parse_workspace_scenario_command( &self, command: &str, ) -> Result<ParsedWorkspaceScenario>
Parse a workspace scenario description
This method extracts information about creating a complete workspace scenario, including domain, chaos characteristics, initial data, and API requirements.
Sourcepub async fn parse_workspace_creation_command(
&self,
command: &str,
) -> Result<ParsedWorkspaceCreation>
pub async fn parse_workspace_creation_command( &self, command: &str, ) -> Result<ParsedWorkspaceCreation>
Parse a workspace creation command
This method extracts information about creating a complete workspace including:
- Workspace name and description
- Entities (customers, orders, payments, etc.)
- Personas with relationships
- Behavioral scenarios (happy path, failure, slow path)
- Reality continuum preferences
- Drift budget preferences
Sourcepub async fn parse_reality_continuum_command(
&self,
command: &str,
) -> Result<ParsedRealityContinuum>
pub async fn parse_reality_continuum_command( &self, command: &str, ) -> Result<ParsedRealityContinuum>
Parse a reality continuum configuration command
This method extracts reality continuum preferences from natural language, such as “80% mock, 20% real prod for catalog only”.
Sourcepub async fn parse_drift_budget_command(
&self,
command: &str,
) -> Result<ParsedDriftBudget>
pub async fn parse_drift_budget_command( &self, command: &str, ) -> Result<ParsedDriftBudget>
Parse a drift budget configuration command
This method extracts drift budget preferences from natural language, such as “strict drift budget” or “moderate tolerance for changes”.
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
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>
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>
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