pub struct IntelligentMockConfig {
pub mode: ResponseMode,
pub prompt: Option<String>,
pub context: Option<String>,
pub count: usize,
pub schema: Option<Value>,
pub constraints: HashMap<String, Value>,
pub temperature: Option<f32>,
pub cache_enabled: bool,
pub rag_config: Option<RagConfig>,
}Expand description
Intelligent mock configuration
Fields§
§mode: ResponseModeResponse generation mode
prompt: Option<String>Intent/prompt for LLM-based generation
context: Option<String>Context for generation (e.g., schema, domain knowledge)
count: usizeNumber of examples to generate
schema: Option<Value>Schema to conform to (JSON Schema format)
constraints: HashMap<String, Value>Additional constraints
temperature: Option<f32>Temperature for LLM (0.0 to 2.0)
cache_enabled: boolEnable caching for repeated requests
rag_config: Option<RagConfig>RAG configuration
Implementations§
Source§impl IntelligentMockConfig
impl IntelligentMockConfig
Sourcepub fn new(mode: ResponseMode) -> Self
pub fn new(mode: ResponseMode) -> Self
Create a new intelligent mock configuration
Sourcepub fn with_prompt(self, prompt: String) -> Self
pub fn with_prompt(self, prompt: String) -> Self
Set the intent prompt
Sourcepub fn with_context(self, context: String) -> Self
pub fn with_context(self, context: String) -> Self
Set the context
Sourcepub fn with_schema(self, schema: Value) -> Self
pub fn with_schema(self, schema: Value) -> Self
Set the schema
Sourcepub fn with_count(self, count: usize) -> Self
pub fn with_count(self, count: usize) -> Self
Set the count
Sourcepub fn with_constraint(self, key: String, value: Value) -> Self
pub fn with_constraint(self, key: String, value: Value) -> Self
Add a constraint
Sourcepub fn with_temperature(self, temperature: f32) -> Self
pub fn with_temperature(self, temperature: f32) -> Self
Set temperature
Sourcepub fn with_rag_config(self, config: RagConfig) -> Self
pub fn with_rag_config(self, config: RagConfig) -> Self
Set RAG configuration
Trait Implementations§
Source§impl Clone for IntelligentMockConfig
impl Clone for IntelligentMockConfig
Source§fn clone(&self) -> IntelligentMockConfig
fn clone(&self) -> IntelligentMockConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntelligentMockConfig
impl Debug for IntelligentMockConfig
Source§impl Default for IntelligentMockConfig
impl Default for IntelligentMockConfig
Source§impl<'de> Deserialize<'de> for IntelligentMockConfig
impl<'de> Deserialize<'de> for IntelligentMockConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IntelligentMockConfig
impl RefUnwindSafe for IntelligentMockConfig
impl Send for IntelligentMockConfig
impl Sync for IntelligentMockConfig
impl Unpin for IntelligentMockConfig
impl UnwindSafe for IntelligentMockConfig
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