Skip to main content

Module ai_handler

Module ai_handler 

Source
Expand description

HTTP-side AI response handler combining IntelligentMockGenerator

  • DataDriftEngine (#656 — post-#555 follow-up). Moved from mockforge_http::ai_handler; original mockforge_core::{Result, Error} imports now resolve directly to mockforge_foundation, so the move is cycle-safe. AI-powered response handler for HTTP requests

This module integrates intelligent mock generation and data drift simulation into the HTTP request handling pipeline.

Moved from mockforge_http::ai_handler under #656 (post-#555 follow-up). Original imports went through mockforge_core::{Result, Error} re-exports, both of which now resolve to mockforge_foundation — so this module is cycle-safe with the Issue #562 core↔intelligence cycle-break.

Note: this module defines its own AiResponseConfig wrapper struct (with intelligent + drift fields). It is distinct from mockforge_foundation::ai_response::AiResponseConfig (LLM temperature / max-tokens) — both names coexist in different modules and are not interchangeable.

Structs§

AiResponseConfig
Configuration for AI-powered responses (to be added to MockResponse)
AiResponseHandler
AI response handler that combines intelligent generation and drift simulation

Functions§

create_ai_handler
Helper function to create an AI handler from optional configs
process_response_with_ai
Process a response body with AI features if configured