Thomas G. Lopes commited on
Commit
b7dc03e
·
1 Parent(s): 16c3549

some ux fixes

Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte CHANGED
@@ -375,7 +375,8 @@
375
  Compare
376
  </button>
377
  <a
378
- href="https://huggingface.co/{$session.conversations[0].model.id}"
 
379
  target="_blank"
380
  class="flex items-center gap-0.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
381
  >
 
375
  Compare
376
  </button>
377
  <a
378
+ href="https://huggingface.co/{$session.conversations[0].model.id}?inference_provider={$session
379
+ .conversations[0].provider}"
380
  target="_blank"
381
  class="flex items-center gap-0.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
382
  >
src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte CHANGED
@@ -46,6 +46,10 @@
46
  function getSnippet({ tokenStr, conversation, lang }: GetSnippetArgs) {
47
  return getInferenceSnippet(conversation.model, conversation.provider as InferenceProvider, lang, tokenStr, {
48
  messages: conversation.messages,
 
 
 
 
49
  });
50
  }
51
 
 
46
  function getSnippet({ tokenStr, conversation, lang }: GetSnippetArgs) {
47
  return getInferenceSnippet(conversation.model, conversation.provider as InferenceProvider, lang, tokenStr, {
48
  messages: conversation.messages,
49
+ streaming: conversation.streaming,
50
+ max_tokens: conversation.config.max_tokens,
51
+ temparature: conversation.config.temperature,
52
+ top_p: conversation.config.top_p,
53
  });
54
  }
55
 
src/lib/components/InferencePlayground/InferencePlaygroundProviderSelect.svelte CHANGED
@@ -89,14 +89,14 @@
89
 
90
  <div {...$menu} use:menu class="rounded-lg border bg-gray-100/80 dark:border-gray-700 dark:bg-gray-800">
91
  {#each conversation.model.inferenceProviderMapping as { provider }}
92
- <div {...$option({ value: provider })} use:option class="group p-1 text-sm dark:text-white">
93
  <div
94
  class="flex items-center gap-2 rounded-md px-2 py-1.5 group-data-[highlighted]:bg-gray-200 dark:group-data-[highlighted]:bg-gray-700"
95
  >
96
  <IconProvider {provider} />
97
  {formatName(provider)}
98
  </div>
99
- </div>
100
  {/each}
101
  </div>
102
  </div>
 
89
 
90
  <div {...$menu} use:menu class="rounded-lg border bg-gray-100/80 dark:border-gray-700 dark:bg-gray-800">
91
  {#each conversation.model.inferenceProviderMapping as { provider }}
92
+ <button {...$option({ value: provider })} use:option class="group block w-full p-1 text-sm dark:text-white">
93
  <div
94
  class="flex items-center gap-2 rounded-md px-2 py-1.5 group-data-[highlighted]:bg-gray-200 dark:group-data-[highlighted]:bg-gray-700"
95
  >
96
  <IconProvider {provider} />
97
  {formatName(provider)}
98
  </div>
99
+ </button>
100
  {/each}
101
  </div>
102
  </div>