plugin_daemon.py 289 B

12345678910111213141516
  1. from typing import Generic, Optional, TypeVar
  2. from pydantic import BaseModel
  3. T = TypeVar("T", bound=(BaseModel | dict))
  4. class PluginDaemonBasicResponse(BaseModel, Generic[T]):
  5. """
  6. Basic response from plugin daemon.
  7. """
  8. code: int
  9. message: str
  10. data: Optional[T]