mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Verify that the user provided a valid openai token by creating a request to the openAI endpoint.
7 lines
No EOL
156 B
Python
7 lines
No EOL
156 B
Python
from litellm import verify_access_key
|
|
|
|
def bad_key():
|
|
key = "bad-key"
|
|
response = verify_access_key(key)
|
|
print(f"response: {response}")
|
|
bad_key() |