Chat session: add `session.reset()` for stateless single-turn requests
メンテナーはふだん 1 日以内に返信
@barhanc がすでに取り組んでいます。
2026年11月27日 から。
評価
この issue はまだ評価されていません。
説明
Problem description
There is no way to clear a chat session. resetOnTurn: true sounds like it, but (as documented) it only forces full re-encoding: the session keeps the history and re-prefills all of it on every turn. Sending the same prompt four times gave 19, 45, 71 and 97 prefilled tokens. For independent single-turn requests (extraction, classification, benchmarks) the only way to get a clean context is to dispose and recreate the session.
Proposed solution
A session.reset() method that clears the history and KV cache back to initialMessages without reloading the model (react-native-litert-lm has resetConversation() for this), or an option that drops each turn from history after it completes. It would also help to state in the docs that resetOnTurn keeps and re-prefills the full history.
Alternative solutions
No response
Benefits to React Native ExecuTorch
Stateless requests are a common use of small on-device models, and recreating the session costs a model reload.
Additional context
No response
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 102
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 46
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
software-mansion/react-native-executorch のほかの issue
-
Require react-native-blob-util >=1.0.0 (Xcode 27 iOS build failure)対応中かも @msluszniak が 23 日前に担当しました。 オープンdependencies platform: ios
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/react-native-executorch#1617 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Android: prebuilt libexecutorch.so SIGILLs on ARMv8.0 CPUs (unguarded LSE atomics in the JNI layer, one-line fix upstream)対応中かも @msluszniak が今日担当しました。 オープンuser exp
software-mansion/react-native-executorch#1665 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
software-mansion/react-native-executorch#1663 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
software-mansion/react-native-executorch#1661 ·
メンテナーはふだん 1 日以内に返信
-
Selfie segmentation: single-channel mask is passed through sigmoid twice対応中かも @barhanc が 1 日前に担当しました。 オープンmodel
software-mansion/react-native-executorch#1660 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
software-mansion/react-native-executorch の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
メンテナーはふだん 1 日以内に返信
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chat対応中かも @koeria が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
milind-soni/OpenMausBot#8023 ·
メンテナーはふだん 1 日以内に返信
-
Windows microphone listing treats words in a device name as DirectShow labels対応中かも @Sujal-chaudhary が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
clipy-recorder/clipy#447 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nightly-labs/openbot#19162 ·
メンテナーはふだん 1 日以内に返信
-
triage:in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Cotal-AI/Cotal#11229 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信