Spaces:
Running
Running
support ephemeral user model credentials
Browse files- endpoints.py +5 -0
endpoints.py
CHANGED
|
@@ -157,6 +157,11 @@ def clear_session_endpoints() -> None:
|
|
| 157 |
with _session_lock:
|
| 158 |
_session_endpoints.clear()
|
| 159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
def session_endpoints() -> list[EndpointConfig]:
|
| 162 |
"""Endpoints added at runtime via the UI (env-var ones excluded)."""
|
|
|
|
| 157 |
with _session_lock:
|
| 158 |
_session_endpoints.clear()
|
| 159 |
|
| 160 |
+
def unregister_endpoint(name: str) -> None:
|
| 161 |
+
"""Remove one ephemeral user endpoint and its API key from memory."""
|
| 162 |
+
with _session_lock:
|
| 163 |
+
_session_endpoints.pop(name, None)
|
| 164 |
+
|
| 165 |
|
| 166 |
def session_endpoints() -> list[EndpointConfig]:
|
| 167 |
"""Endpoints added at runtime via the UI (env-var ones excluded)."""
|