top options
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
@@ -45,13 +45,13 @@
|
|
45 |
model: '01-ai/Yi-1.5-34B-Chat',
|
46 |
config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false },
|
47 |
messages: startMessages
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
-
// {
|
50 |
-
// id: String(Math.random()),
|
51 |
-
// model: '01-ai/Yi-1.5-34B-Chat',
|
52 |
-
// config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false },
|
53 |
-
// messages: startMessages
|
54 |
-
// }
|
55 |
];
|
56 |
|
57 |
let currentConversation = conversations[0];
|
@@ -225,22 +225,36 @@
|
|
225 |
>
|
226 |
{#each conversations as conversation, index}
|
227 |
<div
|
228 |
-
class="flex max-h-[calc(100dvh-5.8rem)] flex-col
|
229 |
bind:this={messageContainer}
|
230 |
>
|
231 |
{#if conversations.length > 1}
|
232 |
<div
|
233 |
-
class="flex
|
234 |
class:mr-3={index === 0}
|
235 |
class:mx-3={index === 1}
|
236 |
>
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
</div>
|
239 |
{/if}
|
240 |
{#if !viewCode}
|
241 |
{#each messages as message, i}
|
242 |
<PlaygroundMessage
|
243 |
-
class=
|
244 |
{message}
|
245 |
on:delete={() => deleteMessage(i)}
|
246 |
autofocus={!loading && i === messages.length - 1}
|
|
|
45 |
model: '01-ai/Yi-1.5-34B-Chat',
|
46 |
config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false },
|
47 |
messages: startMessages
|
48 |
+
},
|
49 |
+
{
|
50 |
+
id: String(Math.random()),
|
51 |
+
model: 'google/gemma-1.1-2b-it',
|
52 |
+
config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false },
|
53 |
+
messages: startMessages
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
];
|
56 |
|
57 |
let currentConversation = conversations[0];
|
|
|
225 |
>
|
226 |
{#each conversations as conversation, index}
|
227 |
<div
|
228 |
+
class="flex max-h-[calc(100dvh-5.8rem)] flex-col overflow-y-auto overflow-x-hidden @container"
|
229 |
bind:this={messageContainer}
|
230 |
>
|
231 |
{#if conversations.length > 1}
|
232 |
<div
|
233 |
+
class="flex h-10 flex-none items-center gap-2 whitespace-nowrap rounded-lg border border-gray-200/80 bg-white px-3 text-sm leading-none shadow-sm"
|
234 |
class:mr-3={index === 0}
|
235 |
class:mx-3={index === 1}
|
236 |
>
|
237 |
+
<div class="size-3.5 rounded bg-black"></div>
|
238 |
+
<div>{conversation.model}</div>
|
239 |
+
<button
|
240 |
+
class="ml-auto flex size-6 items-center justify-center rounded border hover:bg-gray-50"
|
241 |
+
>
|
242 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"
|
243 |
+
><path
|
244 |
+
fill="currentColor"
|
245 |
+
d="M27 16.76v-1.53l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51ZM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20Z"
|
246 |
+
/><path
|
247 |
+
fill="currentColor"
|
248 |
+
d="M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6Zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4Z"
|
249 |
+
/></svg
|
250 |
+
>
|
251 |
+
</button>
|
252 |
</div>
|
253 |
{/if}
|
254 |
{#if !viewCode}
|
255 |
{#each messages as message, i}
|
256 |
<PlaygroundMessage
|
257 |
+
class="border-b"
|
258 |
{message}
|
259 |
on:delete={() => deleteMessage(i)}
|
260 |
autofocus={!loading && i === messages.length - 1}
|