fix: clear token usage when stoping chat

This commit is contained in:
jialin
2025-04-18 11:16:48 +08:00
parent 88af879d31
commit 5d8d38bdf0
@@ -93,6 +93,7 @@ export default function useChatCompletion(
const handleStopConversation = () => { const handleStopConversation = () => {
controllerRef.current?.abort?.(); controllerRef.current?.abort?.();
setLoading(false); setLoading(false);
setTokenResult(null);
}; };
const resetPerRequestCache = () => { const resetPerRequestCache = () => {