wip
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
@@ -53,16 +53,13 @@
|
|
53 |
});
|
54 |
|
55 |
function addMessage() {
|
56 |
-
|
57 |
-
conversation.messages
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
];
|
64 |
-
return conversation;
|
65 |
-
});
|
66 |
}
|
67 |
|
68 |
function updateMessage(value: string, conversationIdx: number, messageIdx: number) {
|
|
|
53 |
});
|
54 |
|
55 |
function addMessage() {
|
56 |
+
conversation.messages = [
|
57 |
+
...conversation.messages,
|
58 |
+
{
|
59 |
+
role: conversation.messages.at(-1)?.role === 'user' ? 'assistant' : 'user',
|
60 |
+
content: ''
|
61 |
+
}
|
62 |
+
];
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
function updateMessage(value: string, conversationIdx: number, messageIdx: number) {
|