Chat session: add `session.reset()` for stateless single-turn requests
Los mantenedores suelen responder en 1 día
@barhanc ya está trabajando en esto.
Desde el 27/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 102
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 46
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de software-mansion/react-native-executorch
-
Require react-native-blob-util >=1.0.0 (Xcode 27 iOS build failure)Posiblemente ocupada @msluszniak la tomó hace 23 días. Abiertodependencies platform: ios
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
software-mansion/react-native-executorch#1617 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Android: prebuilt libexecutorch.so SIGILLs on ARMv8.0 CPUs (unguarded LSE atomics in the JNI layer, one-line fix upstream)Posiblemente ocupada @msluszniak la tomó hoy. Abiertouser exp
software-mansion/react-native-executorch#1665 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
software-mansion/react-native-executorch#1663 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
software-mansion/react-native-executorch#1661 ·
Los mantenedores suelen responder en 1 día
-
Selfie segmentation: single-channel mask is passed through sigmoid twicePosiblemente ocupada @barhanc la tomó hace 1 día. Abiertomodel
software-mansion/react-native-executorch#1660 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de software-mansion/react-native-executorch
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ehmpathy/rhachet-roles-bhrain#878 ·
Los mantenedores suelen responder en 1 día
-
Chat UI: Message actions dropdown is cut off beneath composer when message is near bottom of chatPosiblemente ocupada @koeria la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
milind-soni/OpenMausBot#8023 ·
Los mantenedores suelen responder en 1 día
-
Windows microphone listing treats words in a device name as DirectShow labelsPosiblemente ocupada @Sujal-chaudhary la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
clipy-recorder/clipy#447 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement from-app needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nightly-labs/openbot#19162 ·
Los mantenedores suelen responder en 1 día
-
triage:in-progress
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Cotal-AI/Cotal#11229 · 1 comentario ·
Los mantenedores suelen responder en 1 día