imrpove "token seems invalid" behavipur
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
@@ -132,6 +132,10 @@
|
|
132 |
if (error.message.includes("token seems invalid")) {
|
133 |
hfToken = "";
|
134 |
localStorage.removeItem(hfTokenLocalStorageKey);
|
|
|
|
|
|
|
|
|
135 |
showTokenModal = true;
|
136 |
}
|
137 |
if (error.name !== "AbortError") {
|
|
|
132 |
if (error.message.includes("token seems invalid")) {
|
133 |
hfToken = "";
|
134 |
localStorage.removeItem(hfTokenLocalStorageKey);
|
135 |
+
if (conversation.messages.at(-1)?.role === "assistant") {
|
136 |
+
conversation.messages.pop();
|
137 |
+
conversation.messages = [...conversation.messages];
|
138 |
+
}
|
139 |
showTokenModal = true;
|
140 |
}
|
141 |
if (error.name !== "AbortError") {
|