Messages must alternate between user/assistant roles
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
@@ -83,6 +83,11 @@
|
|
83 |
showTokenModal = true;
|
84 |
return;
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
86 |
(document.activeElement as HTMLElement).blur();
|
87 |
loading = true;
|
88 |
|
|
|
83 |
showTokenModal = true;
|
84 |
return;
|
85 |
}
|
86 |
+
|
87 |
+
if (conversation.messages.at(-1)?.role === "assistant") {
|
88 |
+
return alert("Messages must alternate between user/assistant roles.");
|
89 |
+
}
|
90 |
+
|
91 |
(document.activeElement as HTMLElement).blur();
|
92 |
loading = true;
|
93 |
|