util: verify_access_key

Verify that the user provided a valid openai token by creating a request to the openAI endpoint.
This commit is contained in:
William Espegren 2023-09-12 18:48:23 +02:00
parent c3ed7e2b29
commit 261db15bcf
No known key found for this signature in database
GPG key ID: A77EDBFC7CD4D2AE
3 changed files with 23 additions and 0 deletions

View file

@ -17,6 +17,7 @@ from litellm.utils import (
CustomStreamWrapper,
read_config_args,
completion_with_fallbacks,
verify_access_key,
)
from .llms import anthropic
from .llms import together_ai