security: remove all hardcoded API keys, require from environment
This commit is contained in:
@@ -15,7 +15,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'cli'))
|
||||
class AITBCClient:
|
||||
def __init__(self):
|
||||
self.coordinator_url = "http://localhost:8001"
|
||||
self.api_key = "REDACTED_CLIENT_KEY"
|
||||
self.api_key = "${CLIENT_API_KEY}"
|
||||
|
||||
def submit_job(self, prompt, model="llama3.2:latest", wait_for_result=True):
|
||||
"""Submit a job and optionally wait for result"""
|
||||
|
||||
@@ -107,7 +107,7 @@ def get_job_result(job_id: str) -> Optional[dict]:
|
||||
with httpx.Client() as client:
|
||||
response = client.get(
|
||||
f"{DEFAULT_COORDINATOR}/v1/jobs/{job_id}/result",
|
||||
headers={"X-Api-Key": "REDACTED_CLIENT_KEY"},
|
||||
headers={"X-Api-Key": "${CLIENT_API_KEY}"},
|
||||
timeout=10,
|
||||
)
|
||||
if response.status_code == 200:
|
||||
|
||||
Reference in New Issue
Block a user