Spaces:
Paused
Paused
| import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # API Configuration | |
| API_CONFIG = { | |
| "api_base_url": str(os.getenv("DS_API_BASE_URL", "https://dnext-ds-api.hf.space")), | |
| "api_multimodule_endpoint": str(os.getenv("DS_API_MULTIMODULE_ENDPOINT", "/mcp_multi_module_bug_localization")), | |
| "api_singlemodule_endpoint": str(os.getenv("DS_API_SINGLEMODULE_ENDPOINT", "/mcp_single_module_bug_localization")), | |
| "api_searchspace_endpoint": str(os.getenv("DS_API_SEARCHSPACE_ENDPOINT", "/mcp_search_space_routing")), | |
| "hf_access_token": os.getenv("HF_ACCESS_TOKEN", None), | |
| "timeout": int(os.getenv("TIMEOUT", 120)), | |
| } | |
| # Keycloak Configuration | |
| KEYCLOAK_CONFIG = { | |
| "base_url": os.getenv("KEYCLOAK_BASE_URL", "https://training.test.orbitant.dev"), | |
| "realm": os.getenv("KEYCLOAK_REALM", "orbitant-realm"), | |
| "client_id": os.getenv("KEYCLOAK_CLIENT_ID", "orbitant-backend-client"), | |
| "client_secret": os.getenv("KEYCLOAK_CLIENT_SECRET", " "), | |
| "grant_type": os.getenv("KEYCLOAK_GRANT_TYPE", "password"), | |
| "username": os.getenv("KEYCLOAK_USERNAME", "admin"), | |
| "password": os.getenv("KEYCLOAK_PASSWORD", "admin"), | |
| } | |
| # Token Endpoint | |
| TOKEN_ENDPOINT = f"{KEYCLOAK_CONFIG['base_url']}/realms/{KEYCLOAK_CONFIG['realm']}/protocol/openid-connect/token" |