Assistant markup is stripped from chat history when expressive mode is off

オープン 初心者向け
#7,647 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ShivamSharma43 がすでに取り組んでいます。

2026年10月8日 から。

  • #7661 @ShivamSharma43 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
ai

調査の方向性

agent_activity.py から始め、_resolve_expressive_options() と、各ターンで _strip_assistant_markup を呼び出す else ブランチを特定し、その後そのヘルパーを読んで、過去のアシスタントメッセージからどのタグを削除するかを確認する。現行のスクラビング挙動をアサートしているテストを見つけるため、テストスイート内で _strip_assistant_markup または expressive markup の処理への参照を検索する。完了の条件は、expressive がオフの場合に <emotion/> や <break/> のようなタグがチャット履歴に残り、そのブランチでもうヘルパーが適用されず、影響を受けるテストが更新されてパスすることである。

索引モデルが issue の本文から書いたものです。

説明

When expressive is off, AgentActivity runs _strip_assistant_markup every turn (agent_activity.py, the else branch after _resolve_expressive_options()). It removes XML tags like <emotion/> and <break/> from past assistant messages in the chat history.

We don't use expressive mode. We use the provider plugins directly (Cartesia, Inworld…), and our own prompt tells the LLM which native tags to use. Because of the scrub, the LLM never sees the tags it used in earlier turns, so its delivery is inconsistent across the conversation.

With expressive on, the markup is kept in the chat history. Only with it off are the tags removed, which is the case where the user, not the framework, put them there.

Expected: when expressive is off, don't strip any tags from the chat history.

Version: livekit-agents 1.8.2

主要言語
Python
スター
14.6k
フォーク
3.9k
平均マージ
2日 23時間
マージ済み PR(30日)
263

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

livekit/agents のほかの issue

livekit/agents の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。