mockforge_core/voice/mod.rs
1//! Voice + LLM Interface for MockForge
2//!
3//! This module provides voice input capability that allows users to build mocks
4//! conversationally using natural language commands. It leverages MockForge's
5//! existing LLM infrastructure to interpret voice commands and generate mock APIs.
6//!
7//! # Features
8//!
9//! - **Natural Language Command Parsing**: Interpret voice commands using LLM
10//! - **OpenAPI Spec Generation**: Generate OpenAPI 3.0 specs from voice commands
11//! - **Conversational Mode**: Support multi-turn conversations for iterative refinement
12//! - **Single-Shot Mode**: Process complete commands in one go
13//!
14//! # Example Usage
15//!
16//! ```rust,no_run
17//! use mockforge_core::voice::{VoiceCommandParser, VoiceCommand};
18//! use mockforge_core::intelligent_behavior::IntelligentBehaviorConfig;
19//!
20//! # async fn example() -> mockforge_core::Result<()> {
21//! let config = IntelligentBehaviorConfig::default();
22//! let parser = VoiceCommandParser::new(config);
23//!
24//! // Parse a voice command
25//! let command = "Create a fake e-commerce API with 20 products and a checkout flow";
26//! let parsed = parser.parse_command(command).await?;
27//!
28//! // Generate OpenAPI spec
29//! let spec_generator = VoiceSpecGenerator::new();
30//! let spec = spec_generator.generate_spec(&parsed).await?;
31//! # Ok(())
32//! # }
33//! ```
34
35pub mod command_parser;
36pub mod conversation;
37pub mod spec_generator;
38
39pub use command_parser::{ApiRequirement, ParsedCommand, VoiceCommandParser};
40pub use conversation::{ConversationContext, ConversationManager, ConversationState};
41pub use spec_generator::VoiceSpecGenerator;