初始提交

This commit is contained in:
2026-11-04 19:58:07 +08:00
commit 53b7d22429
829 changed files with 469986 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
from odoo import models
class CallTranscriptionMixin(models.AbstractModel):
"""Define the interface for post-transcription hooks.
Models representing calls (e.g., discuss.call.history, voip.call) should
inherit from this mixin to implement specific behavior after an artifact
is transcribed or when all artifacts of a call are processed."""
_name = "call.transcription.mixin"
_description = "Call Transcription Mixin"
def _after_artifact_transcription_done(self, artifact):
"""Execute hook after a single artifact has been successfully transcribed
:param artifact: the call.artifact record that was transcribed.
"""
pass
def _after_artifact_transcription_error(self, artifact):
"""Execute hook after a single artifact transcription failed
:param artifact: the call.artifact record that failed to transcribe.
"""
pass
def _after_all_artifacts_transcribed(self):
"""Execute hook after all STT artifacts of a call have been processed
(either successfully or with a terminal error).
"""
pass