victor HF staff commited on
Commit
6bcbb4b
1 Parent(s): 6f87481
src/lib/components/Playground/Playground.svelte CHANGED
@@ -56,7 +56,6 @@
56
  let currentConversation = conversations[0];
57
  let systemMessage: Message = { role: 'system', content: '' };
58
  $: messages = currentConversation.messages;
59
- $: currentModel = currentConversation.model;
60
 
61
  let hfToken: string | null = '';
62
  let viewCode = false;
@@ -215,7 +214,7 @@
215
  </div>
216
  </button>
217
  {:else}
218
- <PlaygroundCode model={currentModel} {...currentConversation.config} />
219
  {/if}
220
  </div>
221
 
@@ -313,7 +312,7 @@
313
  </div>
314
  </div>
315
  <div class="flex flex-col gap-6 overflow-y-hidden p-5">
316
- <PlaygroundModelSelector {compatibleModels} bind:currentModel />
317
  <PlaygroundOptions
318
  bind:temperature={currentConversation.config.temperature}
319
  bind:maxTokens={currentConversation.config.maxTokens}
 
56
  let currentConversation = conversations[0];
57
  let systemMessage: Message = { role: 'system', content: '' };
58
  $: messages = currentConversation.messages;
 
59
 
60
  let hfToken: string | null = '';
61
  let viewCode = false;
 
214
  </div>
215
  </button>
216
  {:else}
217
+ <PlaygroundCode {...currentConversation} {...currentConversation.config} />
218
  {/if}
219
  </div>
220
 
 
312
  </div>
313
  </div>
314
  <div class="flex flex-col gap-6 overflow-y-hidden p-5">
315
+ <PlaygroundModelSelector {compatibleModels} bind:currentModel={currentConversation.model} />
316
  <PlaygroundOptions
317
  bind:temperature={currentConversation.config.temperature}
318
  bind:maxTokens={currentConversation.config.maxTokens}
src/lib/components/Playground/PlaygroundCode.svelte CHANGED
@@ -3,7 +3,9 @@
3
  export let streaming: Boolean;
4
  export let temperature: number;
5
  export let maxTokens: number;
6
- export let messages: Array;
 
 
7
 
8
  const npmSnippet = `import { HfInference } from '@huggingface/inference'
9
 
 
3
  export let streaming: Boolean;
4
  export let temperature: number;
5
  export let maxTokens: number;
6
+ export let messages: Message[];
7
+
8
+ $: console.log(messages);
9
 
10
  const npmSnippet = `import { HfInference } from '@huggingface/inference'
11