segovia commited on
Commit
d03abea
·
1 Parent(s): 5234643

fix api calling

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,7 +28,7 @@ def gpu_decorator(fn):
28
  return spaces.GPU(fn)
29
 
30
  @gpu_decorator
31
- def run_orchestrator_endpoint(model: str, api_key: str) -> dict:
32
  """Multi-tenant orchestration endpoint - processes all active tenants and their rules."""
33
  expected_api_key = str(os.getenv("ORCHESTRATOR_API_KEY") or "").strip()
34
  provided_api_key = str(api_key or "").strip()
@@ -39,7 +39,7 @@ def run_orchestrator_endpoint(model: str, api_key: str) -> dict:
39
  "error": "Unauthorized: invalid API key.",
40
  }
41
 
42
- model_name = str(model or "").strip() or os.getenv("OPENAI_MODEL", "gpt-4o")
43
  try:
44
  # Load all active tenants from Firebase
45
  return orchestrate_all_active_tenants(
 
28
  return spaces.GPU(fn)
29
 
30
  @gpu_decorator
31
+ def run_orchestrator_endpoint(api_key: str) -> dict:
32
  """Multi-tenant orchestration endpoint - processes all active tenants and their rules."""
33
  expected_api_key = str(os.getenv("ORCHESTRATOR_API_KEY") or "").strip()
34
  provided_api_key = str(api_key or "").strip()
 
39
  "error": "Unauthorized: invalid API key.",
40
  }
41
 
42
+ model_name = os.getenv("OPENAI_MODEL", "gpt-4o")
43
  try:
44
  # Load all active tenants from Firebase
45
  return orchestrate_all_active_tenants(