teamsbot: Bot-Chat im Transcript, keine AI-Trigger auf eigene Chat-Nachrichten
Made-with: Cursor
This commit is contained in:
parent
d7ba24f61a
commit
c76f2c44f2
1 changed files with 8 additions and 4 deletions
|
|
@ -684,11 +684,11 @@ class TeamsbotService:
|
||||||
logger.debug(f"Session {sessionId}: Chat history stored (no AI trigger): [{speaker}] {text[:60]}")
|
logger.debug(f"Session {sessionId}: Chat history stored (no AI trigger): [{speaker}] {text[:60]}")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Filter out the bot's own speech entirely — captions of the bot's
|
# Filter out the bot's own speech (caption/audioCapture) — garbled text
|
||||||
# own voice come back as garbled text (e.g. German TTS → English caption)
|
# pollutes context. Chat from the bot is clean text and must appear in
|
||||||
# which pollutes the context buffer and confuses AI analysis.
|
# the transcript for all participants.
|
||||||
isBotSpeaker = self._isBotSpeaker(speaker)
|
isBotSpeaker = self._isBotSpeaker(speaker)
|
||||||
if isBotSpeaker:
|
if isBotSpeaker and source != "chat":
|
||||||
logger.debug(f"Session {sessionId}: Ignoring own bot caption from: [{speaker}] {text[:80]}...")
|
logger.debug(f"Session {sessionId}: Ignoring own bot caption from: [{speaker}] {text[:80]}...")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -778,6 +778,10 @@ class TeamsbotService:
|
||||||
if self.config.responseMode == TeamsbotResponseMode.TRANSCRIBE_ONLY:
|
if self.config.responseMode == TeamsbotResponseMode.TRANSCRIBE_ONLY:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Bot's own chat: stored for display only, never trigger AI
|
||||||
|
if source == "chat" and isBotSpeaker:
|
||||||
|
return
|
||||||
|
|
||||||
# Stop phrases: trigger immediately without debounce (root cause: 3s debounce delayed stop)
|
# Stop phrases: trigger immediately without debounce (root cause: 3s debounce delayed stop)
|
||||||
if self._isStopPhrase(text):
|
if self._isStopPhrase(text):
|
||||||
logger.info(f"Session {sessionId}: Stop phrase detected, triggering analysis immediately")
|
logger.info(f"Session {sessionId}: Stop phrase detected, triggering analysis immediately")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue