(self, *, chat_info: ChatInfo, raise_exception=False)
| 321 | raise AppChatNumOutOfBoundsFailed(1002, _("The number of visits exceeds today's visits")) |
| 322 | |
| 323 | def is_valid_application_simple(self, *, chat_info: ChatInfo, raise_exception=False): |
| 324 | self.is_valid_intraday_access_num() |
| 325 | model_id = chat_info.application.model_id |
| 326 | if model_id is None: |
| 327 | return chat_info |
| 328 | model = QuerySet(Model).filter(id=model_id).first() |
| 329 | if model is None: |
| 330 | return chat_info |
| 331 | if model.status == Status.ERROR: |
| 332 | raise ChatException(500, _("The current model is not available")) |
| 333 | if model.status == Status.DOWNLOAD: |
| 334 | raise ChatException(500, _("The model is downloading, please try again later")) |
| 335 | return chat_info |
| 336 | |
| 337 | def chat_simple(self, chat_info: ChatInfo, instance, base_to_response): |
| 338 | message = instance.get('message') |
no test coverage detected