Spaces:
Sleeping
Sleeping
Commit
·
25d50f4
1
Parent(s):
f6f55e7
Update model name in orchestrator and demo functions to "gpt-4.1"; remove outdated comments and documentation
Browse files- mai_dx/__init__.py +1 -16
- mai_dx/main.py +7 -7
mai_dx/__init__.py
CHANGED
@@ -1,20 +1,6 @@
|
|
1 |
-
"""
|
2 |
-
MAI Diagnostic Orchestrator (MAI-DxO)
|
3 |
-
|
4 |
-
An AI-powered diagnostic system that simulates a virtual panel of physician-agents
|
5 |
-
for medical diagnosis. Based on Microsoft Research's "Sequential Diagnosis with
|
6 |
-
Language Models" paper.
|
7 |
-
|
8 |
-
Key Components:
|
9 |
-
- MaiDxOrchestrator: Main orchestrator class
|
10 |
-
- DiagnosisResult: Result container with diagnosis, accuracy, and cost
|
11 |
-
- Action: Action model for panel decisions
|
12 |
-
- AgentRole: Enumeration of physician agent roles
|
13 |
-
"""
|
14 |
-
|
15 |
from typing import Any, Optional
|
16 |
|
17 |
-
from .main import (
|
18 |
MaiDxOrchestrator,
|
19 |
DiagnosisResult,
|
20 |
Action,
|
@@ -24,7 +10,6 @@ from .main import (
|
|
24 |
|
25 |
__version__ = "1.0.0"
|
26 |
__author__ = "The Swarm Corporation"
|
27 |
-
__email__ = "[email protected]"
|
28 |
__description__ = "AI-powered diagnostic system with virtual physician panels"
|
29 |
|
30 |
# Main exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from typing import Any, Optional
|
2 |
|
3 |
+
from mai_dx.main import (
|
4 |
MaiDxOrchestrator,
|
5 |
DiagnosisResult,
|
6 |
Action,
|
|
|
10 |
|
11 |
__version__ = "1.0.0"
|
12 |
__author__ = "The Swarm Corporation"
|
|
|
13 |
__description__ = "AI-powered diagnostic system with virtual physician panels"
|
14 |
|
15 |
# Main exports
|
mai_dx/main.py
CHANGED
@@ -18,7 +18,7 @@ Key Features:
|
|
18 |
|
19 |
Example Usage:
|
20 |
# Standard MAI-DxO usage
|
21 |
-
orchestrator = MaiDxOrchestrator(model_name="
|
22 |
result = orchestrator.run(initial_case_info, full_case_details, ground_truth)
|
23 |
|
24 |
# Budget-constrained variant
|
@@ -131,7 +131,7 @@ class MaiDxOrchestrator:
|
|
131 |
|
132 |
def __init__(
|
133 |
self,
|
134 |
-
model_name: str = "
|
135 |
max_iterations: int = 10,
|
136 |
initial_budget: int = 10000,
|
137 |
mode: str = "no_budget", # "instant", "question_only", "budgeted", "no_budget", "ensemble"
|
@@ -1387,11 +1387,11 @@ def run_mai_dxo_demo(
|
|
1387 |
orchestrator = MaiDxOrchestrator.create_variant(
|
1388 |
variant,
|
1389 |
budget=3000,
|
1390 |
-
model_name="
|
1391 |
)
|
1392 |
else:
|
1393 |
orchestrator = MaiDxOrchestrator.create_variant(
|
1394 |
-
variant, model_name="
|
1395 |
)
|
1396 |
|
1397 |
result = orchestrator.run(
|
@@ -1466,13 +1466,13 @@ def run_mai_dxo_demo(
|
|
1466 |
# orchestrator = MaiDxOrchestrator.create_variant(
|
1467 |
# variant_name,
|
1468 |
# budget=3000,
|
1469 |
-
# model_name="
|
1470 |
# max_iterations=5,
|
1471 |
# )
|
1472 |
# else:
|
1473 |
# orchestrator = MaiDxOrchestrator.create_variant(
|
1474 |
# variant_name,
|
1475 |
-
# model_name="
|
1476 |
# max_iterations=5,
|
1477 |
# )
|
1478 |
|
@@ -1504,7 +1504,7 @@ def run_mai_dxo_demo(
|
|
1504 |
|
1505 |
# ensemble_orchestrator = MaiDxOrchestrator.create_variant(
|
1506 |
# "ensemble",
|
1507 |
-
# model_name="
|
1508 |
# max_iterations=3, # Shorter iterations for ensemble
|
1509 |
# )
|
1510 |
|
|
|
18 |
|
19 |
Example Usage:
|
20 |
# Standard MAI-DxO usage
|
21 |
+
orchestrator = MaiDxOrchestrator(model_name="gpt-4.1")
|
22 |
result = orchestrator.run(initial_case_info, full_case_details, ground_truth)
|
23 |
|
24 |
# Budget-constrained variant
|
|
|
131 |
|
132 |
def __init__(
|
133 |
self,
|
134 |
+
model_name: str = "gpt-4.1",
|
135 |
max_iterations: int = 10,
|
136 |
initial_budget: int = 10000,
|
137 |
mode: str = "no_budget", # "instant", "question_only", "budgeted", "no_budget", "ensemble"
|
|
|
1387 |
orchestrator = MaiDxOrchestrator.create_variant(
|
1388 |
variant,
|
1389 |
budget=3000,
|
1390 |
+
model_name="gpt-4.1",
|
1391 |
)
|
1392 |
else:
|
1393 |
orchestrator = MaiDxOrchestrator.create_variant(
|
1394 |
+
variant, model_name="gpt-4.1"
|
1395 |
)
|
1396 |
|
1397 |
result = orchestrator.run(
|
|
|
1466 |
# orchestrator = MaiDxOrchestrator.create_variant(
|
1467 |
# variant_name,
|
1468 |
# budget=3000,
|
1469 |
+
# model_name="gpt-4.1",
|
1470 |
# max_iterations=5,
|
1471 |
# )
|
1472 |
# else:
|
1473 |
# orchestrator = MaiDxOrchestrator.create_variant(
|
1474 |
# variant_name,
|
1475 |
+
# model_name="gpt-4.1",
|
1476 |
# max_iterations=5,
|
1477 |
# )
|
1478 |
|
|
|
1504 |
|
1505 |
# ensemble_orchestrator = MaiDxOrchestrator.create_variant(
|
1506 |
# "ensemble",
|
1507 |
+
# model_name="gpt-4.1",
|
1508 |
# max_iterations=3, # Shorter iterations for ensemble
|
1509 |
# )
|
1510 |
|