mirror of
https://github.com/langgenius/dify.git
synced 2026-04-04 03:00:25 -04:00
17 lines
365 B
Python
17 lines
365 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Any, TypedDict
|
|
|
|
|
|
class AuthCredentials(TypedDict):
|
|
auth_type: str
|
|
config: dict[str, Any]
|
|
|
|
|
|
class ApiKeyAuthBase(ABC):
|
|
def __init__(self, credentials: AuthCredentials):
|
|
self.credentials = credentials
|
|
|
|
@abstractmethod
|
|
def validate_credentials(self):
|
|
raise NotImplementedError
|