mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
9d221a5e19
Co-authored-by: Yi <yxiaoisme@gmail.com>
27 lines
597 B
Python
27 lines
597 B
Python
from typing import Literal, Optional, Union
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class AuthorizationConfig(BaseModel):
|
|
type: Literal[None, "basic", "bearer", "custom"]
|
|
api_key: Union[None, str] = None
|
|
header: Union[None, str] = None
|
|
|
|
|
|
class Authorization(BaseModel):
|
|
type: Literal["no-auth", "api-key"]
|
|
config: Optional[AuthorizationConfig] = None
|
|
|
|
|
|
class ProcessStatusSetting(BaseModel):
|
|
request_method: str
|
|
url: str
|
|
|
|
|
|
class ExternalKnowledgeApiSetting(BaseModel):
|
|
url: str
|
|
request_method: str
|
|
headers: Optional[dict] = None
|
|
params: Optional[dict] = None
|