intent_org.py 712 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from datetime import datetime
  4. from pydantic import ConfigDict
  5. from common.schema import SchemaBase
  6. class IntentOrgSchemaBase(SchemaBase):
  7. name: str
  8. api_key: str
  9. openai_base: str
  10. openai_key: str
  11. intent_callback: str
  12. mismatch_callback: str
  13. status: int
  14. deleted_time: datetime | None = None
  15. class CreateIntentOrgParam(IntentOrgSchemaBase):
  16. pass
  17. class UpdateIntentOrgParam(IntentOrgSchemaBase):
  18. pass
  19. class GetIntentOrgListDetails(IntentOrgSchemaBase):
  20. model_config = ConfigDict(from_attributes=True)
  21. class CurrentIntentOrgIns(GetIntentOrgListDetails):
  22. id: int
  23. model_config = ConfigDict(from_attributes=True)