Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /amphetamarina_litellm /litellm /proxy /custom_auth_auto.py
| """ | |
| Example custom auth function. | |
| This will allow all keys starting with "my-custom-key" to pass through. | |
| """ | |
| from fastapi import Request | |
| from litellm.proxy._types import UserAPIKeyAuth | |
| async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth: | |
| try: | |
| if api_key.startswith("my-custom-key"): | |
| return UserAPIKeyAuth(api_key=api_key) | |
| else: | |
| raise Exception("Invalid API key") | |
| except Exception: | |
| raise Exception("Invalid API key") | |
Xet Storage Details
- Size:
- 503 Bytes
- Xet hash:
- 6064a23335ad7e319e3273cc81466cfad0264b438b5b25b0006fbe188399ec17
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.