update lic

This commit is contained in:
Ivan Office
2025-02-07 19:12:54 +08:00
parent 63395b33fc
commit c5d7fdfcc4
5 changed files with 11 additions and 12 deletions

View File

@@ -314,11 +314,13 @@ class Channel(models.Model):
# if msg_len * 2 >= 8000:
# messages = [{"role": "user", "content": msg}]
self.get_ai_response(ai, messages, channel, user_id, message)
# if sync_config == 'sync':
# self.get_ai_response(ai, messages, channel, user_id, message)
# else:
# self.with_delay().get_ai_response(ai, messages, channel, user_id, message)
if sync_config == 'sync':
self.get_ai_response(ai, messages, channel, user_id, message)
else:
if hasattr(self, 'with_delay'):
self.with_delay().get_ai_response(ai, messages, channel, user_id, message)
else:
self.get_ai_response(ai, messages, channel, user_id, message)
except Exception as e:
raise UserError(e)