FaultMaven Core Library - Shared models, LLM infrastructure, and preprocessing logic for FaultMaven microservices.
This library provides the foundational components shared across all FaultMaven microservices:
- Models: Case, Evidence, Hypothesis, InvestigationProgress, and API models
- LLM Infrastructure: Multi-provider LLM routing with failover (OpenAI, Anthropic, Fireworks AI)
- Preprocessing: Data sanitization and preprocessing logic
pip install fm-core-libfrom fm_core_lib.models import Case, CaseStatus, InvestigationProgress
# Create a new case
case = Case(
case_id="case_123",
user_id="user_456",
status=CaseStatus.CONSULTING,
investigation_progress=InvestigationProgress()
)from fm_core_lib.infrastructure.llm import LLMRouter
router = LLMRouter()
response = await router.generate(
messages=[{"role": "user", "content": "Hello"}],
temperature=0.7
)# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src tests
# Type checking
mypy srcThis library follows the "Open Core" strategy - a single codebase that can be configured at runtime via the PROFILE environment variable:
PROFILE=public: Community edition featuresPROFILE=enterprise: Enterprise edition with additional capabilities
MIT