-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
43 lines (35 loc) · 1.19 KB
/
config.py
File metadata and controls
43 lines (35 loc) · 1.19 KB
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
"""Environment configuration for the MedAssist demo."""
from __future__ import annotations
import os
from dataclasses import dataclass
@dataclass(frozen=True)
class DemoConfig:
"""All external configuration loaded from environment variables."""
broker_url: str
client_id: str
client_secret: str
admin_secret: str
llm_base_url: str
llm_api_key: str
llm_model: str
@classmethod
def from_env(cls) -> DemoConfig:
return cls(
broker_url=os.environ.get("AGENTWRIT_BROKER_URL", "http://localhost:8080"),
client_id=os.environ.get("AGENTWRIT_CLIENT_ID", ""),
client_secret=os.environ.get("AGENTWRIT_CLIENT_SECRET", ""),
admin_secret=os.environ.get("AGENTWRIT_ADMIN_SECRET", ""),
llm_base_url=os.environ.get("LLM_BASE_URL", "https://api.openai.com/v1"),
llm_api_key=os.environ.get("LLM_API_KEY", ""),
llm_model=os.environ.get("LLM_MODEL", "gpt-4o-mini"),
)
APP_SCOPE_CEILING: list[str] = [
"read:records:*",
"write:records:*",
"read:labs:*",
"write:prescriptions:*",
"read:formulary:*",
"read:billing:*",
"write:billing:*",
"read:insurance:*",
]