intent_org.py 727 B

1234567891011121314151617181920212223242526272829303132333435
  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. model: str
  12. intent_callback: str
  13. mismatch_callback: str
  14. status: int
  15. deleted_time: datetime | None = None
  16. class CreateIntentOrgParam(IntentOrgSchemaBase):
  17. pass
  18. class UpdateIntentOrgParam(IntentOrgSchemaBase):
  19. pass
  20. class GetIntentOrgListDetails(IntentOrgSchemaBase):
  21. model_config = ConfigDict(from_attributes=True)
  22. class CurrentIntentOrgIns(GetIntentOrgListDetails):
  23. id: int
  24. model_config = ConfigDict(from_attributes=True)