File size: 1,277 Bytes
3516027
 
 
 
 
 
 
3da7106
 
 
 
e8f51cf
3da7106
92d7038
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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"