mishig HF staff commited on
Commit
9705bbb
1 Parent(s): 44d9405
src/lib/components/InferencePlayground/InferencePlayground.svelte CHANGED
@@ -55,15 +55,8 @@
55
  ];
56
  }
57
 
58
- function deleteAndGetItem<T>(array: T[], index: number) {
59
- if (index >= 0 && index < array.length) {
60
- return array.splice(index, 1)[0];
61
- }
62
- return undefined;
63
- }
64
-
65
  function deleteMessage(idx: number) {
66
- deleteAndGetItem<ChatCompletionInputMessage>(conversation.messages, idx);
67
  conversation = conversation;
68
  }
69
 
@@ -277,11 +270,7 @@
277
  <div
278
  class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
279
  >
280
- <ModelSelector
281
- {models}
282
- bind:conversation
283
- on:click={() => (showModelPickerModal = open)}
284
- />
285
 
286
  <GenerationConfig bind:conversation />
287
  <div class="mt-auto">
 
55
  ];
56
  }
57
 
 
 
 
 
 
 
 
58
  function deleteMessage(idx: number) {
59
+ conversation.messages.splice(idx, 1)[0];
60
  conversation = conversation;
61
  }
62
 
 
270
  <div
271
  class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
272
  >
273
+ <ModelSelector {models} bind:conversation on:click={() => (showModelPickerModal = open)} />
 
 
 
 
274
 
275
  <GenerationConfig bind:conversation />
276
  <div class="mt-auto">