File size: 1,936 Bytes
a5f4f6d
 
25d50f4
a5f4f6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from typing import Any, Optional

from mai_dx.main import (
    MaiDxOrchestrator,
    DiagnosisResult,
    Action,
    AgentRole,
    run_mai_dxo_demo
)

__version__ = "1.0.0"
__author__ = "The Swarm Corporation"
__description__ = "AI-powered diagnostic system with virtual physician panels"

# Main exports
__all__ = [
    "MaiDxOrchestrator",
    "DiagnosisResult", 
    "Action",
    "AgentRole",
    "run_mai_dxo_demo"
]

# Convenience imports for common usage patterns
def create_orchestrator(
    model_name: str = "gemini/gemini-2.5-flash",
    mode: str = "no_budget",
    **kwargs: Any
) -> MaiDxOrchestrator:
    """
    Convenience function to create a MAI-DxO orchestrator.
    
    Args:
        model_name: Language model to use
        mode: Operational mode
        **kwargs: Additional configuration parameters
        
    Returns:
        Configured MaiDxOrchestrator instance
    """
    if mode in ["instant", "question_only", "budgeted", "no_budget", "ensemble"]:
        return MaiDxOrchestrator.create_variant(mode, model_name=model_name, **kwargs)
    else:
        return MaiDxOrchestrator(model_name=model_name, mode=mode, **kwargs)


def quick_diagnosis(
    case_info: str,
    case_details: str,
    ground_truth: Optional[str] = None,
    model_name: str = "gemini/gemini-2.5-flash"
) -> DiagnosisResult:
    """
    Convenience function for quick diagnosis without configuration.
    
    Args:
        case_info: Initial case presentation
        case_details: Complete case information
        ground_truth: Correct diagnosis (optional)
        model_name: Model to use
        
    Returns:
        DiagnosisResult with diagnosis and evaluation
    """
    orchestrator = MaiDxOrchestrator(model_name=model_name, max_iterations=5)
    return orchestrator.run(
        initial_case_info=case_info,
        full_case_details=case_details,
        ground_truth_diagnosis=ground_truth or "Unknown"
    )