diff options
author | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
---|---|---|
committer | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
commit | 4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch) | |
tree | ee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py | |
parent | cc961e04ba734dd72309fb548a2f97d67d578813 (diff) | |
download | gn-ai-master.tar.gz |
Diffstat (limited to '.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py')
-rw-r--r-- | .venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py new file mode 100644 index 00000000..4d633a54 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py @@ -0,0 +1,14 @@ +from fastapi import Request + +from litellm.proxy._types import UserAPIKeyAuth + + +async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth: + try: + return UserAPIKeyAuth( + api_key="best-api-key-ever", + user_id="best-user-id-ever", + team_id="best-team-id-ever", + ) + except Exception: + raise Exception |