Chat session: add `session.reset()` for stateless single-turn requests
Maintainer antworten meist innerhalb von 1 Tag
@barhanc arbeitet bereits daran.
Seit 27.11.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.8k
- Forks
- 102
- Ø Merge
- 2 T. 6 Std.
- Gemergte PRs (30 T.)
- 46
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus software-mansion/react-native-executorch
-
Require react-native-blob-util >=1.0.0 (Xcode 27 iOS build failure)Evtl. vergeben @msluszniak hat das vor 23 Tagen übernommen. Offendependencies platform: ios
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
software-mansion/react-native-executorch#1617 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Android: prebuilt libexecutorch.so SIGILLs on ARMv8.0 CPUs (unguarded LSE atomics in the JNI layer, one-line fix upstream)Evtl. vergeben @msluszniak hat das heute übernommen. Offenuser exp
software-mansion/react-native-executorch#1665 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
software-mansion/react-native-executorch#1663 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
software-mansion/react-native-executorch#1661 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Selfie segmentation: single-channel mask is passed through sigmoid twiceEvtl. vergeben @barhanc hat das vor 1 Tag übernommen. Offenmodel
software-mansion/react-native-executorch#1660 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in software-mansion/react-native-executorch
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chatEvtl. vergeben @koeria hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
milind-soni/OpenMausBot#8023 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Windows microphone listing treats words in a device name as DirectShow labelsEvtl. vergeben @Sujal-chaudhary hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
clipy-recorder/clipy#447 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement from-app needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
nightly-labs/openbot#19162 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage:in-progress
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Cotal-AI/Cotal#11229 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag