Skip to content

Commit dce2320

Browse files
committed
add agent and client implementation
1 parent a870ca6 commit dce2320

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
HealthResponse
2424
)
2525

26-
AGENT_SEED = os.getenv("AGENT_SEED", "medical-client-{int()}")
26+
AGENT_SEED = os.getenv("AGENT_SEED", f"medical-client-{int(time.time())}")
2727
AGENT_NAME = os.getenv("AGENT_NAME", "Medical Prediction Agent")
28+
PORT = int(os.getenv("PORT", "8008"))
2829

2930

3031
class CLIClient:
@@ -47,7 +48,8 @@ def __init__(self, agent_address: str, image_path: str, patient_id: str = None,
4748
self.agent = Agent(
4849
name="secretai-fetch-agent-cli",
4950
seed=f"cli-client-{int(time.time())}",
50-
port=8008
51+
port=PORT,
52+
endpoint=f"http://localhost:{PORT}/submit"
5153
)
5254

5355
self._setup_handlers()

medical_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# Configuration
3030
AGENT_SEED = os.getenv("AGENT_SEED", "medical-prediction-agent-2025")
3131
AGENT_NAME = os.getenv("AGENT_NAME", "Medical Prediction Agent")
32-
API_ENDPOINT = os.getenv("API_ENDPOINT", "https://secretai-fetch.scrtlabs.com:23434/predict/breast-density")
32+
API_ENDPOINT = os.getenv("API_ENDPOINT", "https://secretai-fetch-morai.scrtlabs.com:23434/predict/breast-density")
3333
API_TOKEN = os.getenv("API_TOKEN", "bWFzdGVyQHNjcnRsYWJzLmNvbTpTZWNyZXROZXR3b3JrTWFzdGVyS2V5X18yMDI1")
3434
PORT = int(os.getenv("PORT", "8000"))
3535
TEMP_DIR = os.getenv("TEMP_DIR", "/tmp/medical_agent")

0 commit comments

Comments
 (0)