dify/api/core/plugin/entities/endpoint.py
2024-09-30 17:39:13 +08:00

29 lines
617 B
Python

from datetime import datetime
from pydantic import BaseModel, Field
from core.entities.provider_entities import ProviderConfig
from core.plugin.entities.base import BasePluginEntity
class EndpointDeclaration(BaseModel):
"""
declaration of an endpoint
"""
settings: list[ProviderConfig] = Field(default_factory=list)
class EndpointEntity(BasePluginEntity):
"""
entity of an endpoint
"""
settings: dict
name: str
hook_id: str
tenant_id: str
plugin_id: str
expired_at: datetime
declaration: EndpointDeclaration = Field(default_factory=EndpointDeclaration)