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”.