mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 03:38:08 +08:00
ba5f8afaa8
Co-authored-by: Nicolas <nicolascamara29@gmail.com> Co-authored-by: chenhe <guchenhe@gmail.com> Co-authored-by: takatost <takatost@gmail.com>
15 lines
372 B
Python
15 lines
372 B
Python
|
|
from services.auth.firecrawl import FirecrawlAuth
|
|
|
|
|
|
class ApiKeyAuthFactory:
|
|
|
|
def __init__(self, provider: str, credentials: dict):
|
|
if provider == 'firecrawl':
|
|
self.auth = FirecrawlAuth(credentials)
|
|
else:
|
|
raise ValueError('Invalid provider')
|
|
|
|
def validate_credentials(self):
|
|
return self.auth.validate_credentials()
|