mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 19:27:48 +08:00
17fd773a30
Co-authored-by: -LAN- <laipz8200@outlook.com>
13 lines
370 B
Python
13 lines
370 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()
|