mishig HF staff commited on
Commit
651e1d0
1 Parent(s): 1457dc9
src/lib/components/InferencePlayground/InferencePlayground.svelte CHANGED
@@ -53,16 +53,13 @@
53
  });
54
 
55
  function addMessage() {
56
- conversations = conversations.map((conversation) => {
57
- conversation.messages = [
58
- ...conversation.messages,
59
- {
60
- role: conversation.messages.at(-1)?.role === 'user' ? 'assistant' : 'user',
61
- content: ''
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) {