Spaces:
Sleeping
Sleeping
make sure messages alternate with user/assistant roles
Browse files127 unmodified lines128129130131132133134135136137138139140141127 unmodified linesconst endTime = performance.now();latency = Math.round(endTime - startTime);} catch (error) {if (error instanceof Error) {if (error.message.includes("token seems invalid")) {hfToken = "";localStorage.removeItem(hfTokenLocalStorageKey);if (conversation.messages.at(-1)?.role === "assistant") {conversation.messages.pop();conversation.messages = [...conversation.messages];}showTokenModal = true;}if (error.name !== "AbortError") {127 unmodified lines128129130131132133134135136137138139140141127 unmodified linesconst endTime = performance.now();latency = Math.round(endTime - startTime);} catch (error) {if (conversation.messages.at(-1)?.role === "assistant") {conversation.messages.pop();conversation.messages = [...conversation.messages];}if (error instanceof Error) {if (error.message.includes("token seems invalid")) {hfToken = "";localStorage.removeItem(hfTokenLocalStorageKey);showTokenModal = true;}if (error.name !== "AbortError") {
src/lib/components/InferencePlayground/InferencePlayground.svelte+4-4