Spaces:
Runtime error
Runtime error
testing stuff
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
|
@@ -48,6 +48,10 @@
|
|
| 48 |
}
|
| 49 |
];
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
let currentConversation = conversations[0];
|
| 52 |
let systemMessage: Message = { role: 'system', content: '' };
|
| 53 |
$: messages = currentConversation.messages;
|
|
@@ -224,7 +228,7 @@
|
|
| 224 |
>
|
| 225 |
{#if conversations.length > 1}
|
| 226 |
<div
|
| 227 |
-
class="flex h-
|
| 228 |
class:mr-3={index === 0}
|
| 229 |
class:mx-3={index === 1}
|
| 230 |
>
|
|
|
|
| 48 |
}
|
| 49 |
];
|
| 50 |
|
| 51 |
+
$: if (conversations.length > 1) {
|
| 52 |
+
viewCode = false;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
let currentConversation = conversations[0];
|
| 56 |
let systemMessage: Message = { role: 'system', content: '' };
|
| 57 |
$: messages = currentConversation.messages;
|
|
|
|
| 228 |
>
|
| 229 |
{#if conversations.length > 1}
|
| 230 |
<div
|
| 231 |
+
class="flex h-11 flex-none items-center gap-1.5 whitespace-nowrap rounded-lg border border-gray-200/80 bg-white pl-3 pr-2 text-sm leading-none shadow-sm *:flex-none"
|
| 232 |
class:mr-3={index === 0}
|
| 233 |
class:mx-3={index === 1}
|
| 234 |
>
|
src/lib/components/Playground/PlaygroundMessage.svelte
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
</script>
|
| 14 |
|
| 15 |
<div
|
| 16 |
-
class="group/message group grid grid-cols-[1fr,2.5rem] items-start gap-2 px-
|
| 17 |
>
|
| 18 |
<div class="col-span-2 pb-1 pt-3 text-sm font-semibold uppercase @2xl:col-span-1 @2xl:pb-2">
|
| 19 |
{message.role}
|
|
|
|
| 13 |
</script>
|
| 14 |
|
| 15 |
<div
|
| 16 |
+
class="group/message group grid grid-cols-[1fr,2.5rem] items-start gap-2 px-3.5 pb-6 pt-4 hover:bg-gray-100/70 @2xl:grid-cols-[130px,1fr,2.5rem] @2xl:grid-rows-1 @2xl:gap-4 @2xl:px-6 dark:hover:bg-gray-800/50 {$$props.class}"
|
| 17 |
>
|
| 18 |
<div class="col-span-2 pb-1 pt-3 text-sm font-semibold uppercase @2xl:col-span-1 @2xl:pb-2">
|
| 19 |
{message.role}
|
src/lib/components/Playground/PlaygroundModelSelector.svelte
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
<script lang="ts">
|
| 2 |
export let compatibleModels: string[] = [];
|
| 3 |
export let currentModel = compatibleModels[0];
|
|
|
|
| 4 |
</script>
|
| 5 |
|
| 6 |
<div>
|
|
@@ -10,6 +11,7 @@
|
|
| 10 |
>Models<span class="ml-4 font-normal text-gray-400">{compatibleModels.length}</span>
|
| 11 |
</label>
|
| 12 |
<select
|
|
|
|
| 13 |
bind:value={currentModel}
|
| 14 |
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
| 15 |
>
|
|
|
|
| 1 |
<script lang="ts">
|
| 2 |
export let compatibleModels: string[] = [];
|
| 3 |
export let currentModel = compatibleModels[0];
|
| 4 |
+
export let disabled = false;
|
| 5 |
</script>
|
| 6 |
|
| 7 |
<div>
|
|
|
|
| 11 |
>Models<span class="ml-4 font-normal text-gray-400">{compatibleModels.length}</span>
|
| 12 |
</label>
|
| 13 |
<select
|
| 14 |
+
{disabled}
|
| 15 |
bind:value={currentModel}
|
| 16 |
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
| 17 |
>
|