Spaces:
Sleeping
Sleeping
multi conv
Browse filesFiles changed (3)
214 unmodified lines2152162172182192202211 unmodified line22322422522622722822923023123223323423523623723823924024126 unmodified lines26826927027127227327487 unmodified lines362363364365366367368369370214 unmodified lines></textarea></div></div><div class="relative divide-y divide-gray-200 dark:divide-gray-800"><divclass="flex h-[calc(100dvh-5rem)] divide-x divide-gray-200 {conversations.length === 2? '*:w-1/2'1 unmodified line? '*:w-1/3': '*:w-full'} dark:divide-gray-800">{#each conversations as conversation}<divclass="flex max-h-[calc(100dvh-5rem)] flex-col divide-y divide-gray-200 overflow-y-auto overflow-x-hidden @container dark:divide-gray-800"bind:this={messageContainer}>{#if conversations.length > 1}<div class="mt-3 flex h-10 items-center px-6 pb-2 text-gray-500">{conversation.model}</div>{/if}{#if !viewCode}{#each messages as message, i}<PlaygroundMessage{message}on:delete={() => deleteMessage(i)}autofocus={!loading && i === messages.length - 1}26 unmodified lines{/each}</div><divclass="fixed inset-x-0 bottom-0 flex h-20 items-center gap-2 overflow-hidden whitespace-nowrap px-5 md:absolute"><buttontype="button"87 unmodified lines</div></div>{#if conversations.length === 1}<div class="flex flex-col rounded-xl p-3"><divclass="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-lg 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"><PlaygroundModelSelector {compatibleModels} bind:currentModel={currentConversation.model} /><PlaygroundOptions214 unmodified lines2152162172182192202211 unmodified line22322422522622722822923023123223323423523623723823924024124224324424524626 unmodified lines27327427527627727827987 unmodified lines367368369370371372373374375214 unmodified lines></textarea></div></div><div class="relative divide-y divide-gray-200 pt-3 dark:divide-gray-800"><divclass="flex h-[calc(100dvh-5rem)] divide-x divide-gray-200 {conversations.length === 2? '*:w-1/2'1 unmodified line? '*:w-1/3': '*:w-full'} dark:divide-gray-800">{#each conversations as conversation, index}<divclass="flex max-h-[calc(100dvh-5.8rem)] flex-col divide-y divide-gray-200 overflow-y-auto overflow-x-hidden @container dark:divide-gray-800"bind:this={messageContainer}>{#if conversations.length > 1}<divclass="flex flex h-10 flex-none items-center rounded-lg border border-gray-200/80 bg-white px-3 font-mono text-sm shadow-sm"class:mr-3={index === 0}class:mx-3={index === 1}>{conversation.model}</div>{/if}{#if !viewCode}{#each messages as message, i}<PlaygroundMessageclass={i === 0 ? '!border-transparent' : ''}{message}on:delete={() => deleteMessage(i)}autofocus={!loading && i === messages.length - 1}26 unmodified lines{/each}</div><divclass="fixed inset-x-0 bottom-0 flex h-20 items-center gap-2 overflow-hidden whitespace-nowrap px-3 md:absolute"><buttontype="button"87 unmodified lines</div></div>{#if conversations.length === 1}<div class="flex flex-col p-3"><divclass="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"><PlaygroundModelSelector {compatibleModels} bind:currentModel={currentConversation.model} /><PlaygroundOptions
63 unmodified lines646566676869707172737475767763 unmodified lines<h2 class="font-semibold">Install and instantiate</h2></div><preclass="overflow-x-auto rounded-lg border border-gray-100 bg-gray-50 px-4 py-6 text-sm dark:border-gray-800 dark:bg-gray-800/50">{npmSnippet}</pre><div class="px-4 pb-4 pt-6"><h2 class="font-semibold">{streaming ? 'Streaming API' : 'Non-Streaming API'}</h2></div><preclass="overflow-x-auto rounded-lg border border-gray-100 bg-gray-50 px-4 py-6 text-sm dark:border-gray-800 dark:bg-gray-800/50">{streaming? streamingSnippet: nonStreamingSnippet}</pre>63 unmodified lines646566676869707172737475767763 unmodified lines<h2 class="font-semibold">Install and instantiate</h2></div><preclass="overflow-x-auto rounded-lg border border-gray-200/80 bg-white px-4 py-6 text-sm shadow-sm dark:border-gray-800 dark:bg-gray-800/50">{npmSnippet}</pre><div class="px-4 pb-4 pt-6"><h2 class="font-semibold">{streaming ? 'Streaming API' : 'Non-Streaming API'}</h2></div><preclass="overflow-x-auto rounded-lg border border-gray-200/80 bg-white px-4 py-6 text-sm shadow-sm dark:border-gray-800 dark:bg-gray-800/50">{streaming? streamingSnippet: nonStreamingSnippet}</pre>
12 unmodified lines1314151617181912 unmodified lines</script><divclass="group/message group grid grid-cols-[1fr,2.5rem] items-start gap-2 px-6 pb-6 pt-4 hover:bg-gray-50 @2xl:grid-cols-[130px,1fr,2.5rem] @2xl:grid-rows-1 @2xl:gap-4 dark:hover:bg-gray-800/50"><div class="col-span-2 pb-1 pt-3 text-sm font-semibold uppercase @2xl:col-span-1 @2xl:pb-2">{message.role}12 unmodified lines1314151617181912 unmodified lines</script><divclass="group/message group grid grid-cols-[1fr,2.5rem] items-start gap-2 px-6 pb-6 pt-4 hover:bg-gray-50 @2xl:grid-cols-[130px,1fr,2.5rem] @2xl:grid-rows-1 @2xl:gap-4 dark:hover:bg-gray-800/50 {$$props.class}"><div class="col-span-2 pb-1 pt-3 text-sm font-semibold uppercase @2xl:col-span-1 @2xl:pb-2">{message.role}
src/lib/components/Playground/Playground.svelte+12-7
src/lib/components/Playground/PlaygroundCode.svelte+2-2
src/lib/components/Playground/PlaygroundMessage.svelte+1-1