Spaces:
Runtime error
Runtime error
new ui style
Browse files47 unmodified lines4849505152535455138 unmodified lines1941951961971981992002012022032042052062072082092109 unmodified lines220221222223224225226227228125 unmodified lines3543553563573583593603613623633643653663673685 unmodified lines3743753763773783793805 unmodified lines38638738838939039139239339439539639739839940040140240340440540647 unmodified lines}// {// id: String(Math.random()),// model: 'google/gemma-1.1-2b-it',// config: { temperature: 0.1, maxTokens: 2048, streaming: true, jsonMode: false },// messages: startMessages// }];138 unmodified lines{/if}<divclass="w-dvh maxdivide-gray-200 grid overflow-hidden max-md:divide-y md:h-dvh md:grid-cols-[clamp(220px,20%,350px),minmax(0,1fr),clamp(270px,25%,300px)] md:divide-x dark:divide-gray-800 dark:bg-gray-900 dark:text-gray-300"><div class="relative flex flex-col overflow-y-auto px-5 pb-24 pt-7"><div class="pb-2 text-sm font-semibold">SYSTEM</div><textareaname=""id=""placeholder="Enter a custom prompt"bind:value={systemMessage.content}class="absolute inset-x-0 bottom-0 h-full resize-none bg-transparent p-2 px-5 pr-4 pt-16 text-sm outline-none"></textarea></div><div class="relative divide-y divide-gray-200 dark:divide-gray-800"><div9 unmodified linesbind:this={messageContainer}>{#if conversations.length > 1}<divclass="flex h-10 items-center bg-gradient-to-r from-gray-50 px-6 text-gray-500 dark:from-gray-400/20">{conversation.model}</div>{/if}125 unmodified lines</button></div></div><div class="flex flex-col gap-6 overflow-y-hidden p-5"><PlaygroundModelSelector {compatibleModels} bind:currentModel={currentConversation.model} /><PlaygroundOptionsbind:temperature={currentConversation.config.temperature}bind:maxTokens={currentConversation.config.maxTokens}bind:jsonMode={currentConversation.config.jsonMode}bind:streaming={currentConversation.config.streaming}/><!-- <divclass="mt-auto flex max-w-xs flex-col items-start gap-2.5 rounded-lg border bg-white p-4 text-gray-500 shadow dark:border-gray-800 dark:bg-gray-800/50 dark:text-gray-400"role="alert">5 unmodified lines>Get PRO ($9/month)</a></div> --><!-- <divclass="flex max-w-xs flex-col items-start gap-2.5 rounded-lg border bg-white p-4 text-gray-500 shadow dark:bg-gray-800 dark:text-gray-400"role="alert">5 unmodified lines>Deploy dedicated</a></div> --><div class="mt-auto"><div class="mb-3 flex items-center justify-between gap-2"><label for="default-range" class="block text-sm font-medium text-gray-900 dark:text-white">API Quota</label><spanclass="rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-300">Free</span><div class="ml-auto w-12 text-right text-sm">76%</div></div><div class="h-2 w-full rounded-full bg-gray-200 dark:bg-gray-700"><div class="h-2 rounded-full bg-black dark:bg-gray-400" style="width: 75%"></div></div></div></div></div>47 unmodified lines4849505152535455138 unmodified lines1941951961971981992002012022032042052062072082092102112122132142152162172182199 unmodified lines229230231232233234235125 unmodified lines3613623633643653663673683693703713723733743753763773783795 unmodified lines3853863873883893903915 unmodified lines39739839940040140240340440540640740840941041141241341441541641741841942047 unmodified lines}// {// id: String(Math.random()),// model: '01-ai/Yi-1.5-34B-Chat',// config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false },// messages: startMessages// }];138 unmodified lines{/if}<divclass="w-dvh grid divide-gray-200 overflow-hidden bg-gray-100/50 max-md:divide-y md:h-dvh{conversations.length === 1? 'md:grid-cols-[clamp(220px,20%,350px),minmax(0,1fr),clamp(270px,25%,300px)]': 'md:grid-cols-[clamp(220px,20%,350px),minmax(0,1fr),0]'}dark:divide-gray-800 dark:bg-gray-900 dark:text-gray-300"><div class=" flex flex-col overflow-y-auto p-3"><divclass="relative 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"><div class="pb-2 text-sm font-semibold">SYSTEM</div><textareaname=""id=""placeholder="Enter a custom prompt"bind:value={systemMessage.content}class="absolute inset-x-0 bottom-0 h-full resize-none bg-transparent px-3 pt-10 text-sm outline-none"></textarea></div></div><div class="relative divide-y divide-gray-200 dark:divide-gray-800"><div9 unmodified linesbind: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}125 unmodified lines</button></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} /><PlaygroundOptionsbind:temperature={currentConversation.config.temperature}bind:maxTokens={currentConversation.config.maxTokens}bind:jsonMode={currentConversation.config.jsonMode}bind:streaming={currentConversation.config.streaming}/><!-- <divclass="mt-auto flex max-w-xs flex-col items-start gap-2.5 rounded-lg border bg-white p-4 text-gray-500 shadow dark:border-gray-800 dark:bg-gray-800/50 dark:text-gray-400"role="alert">5 unmodified lines>Get PRO ($9/month)</a></div> --><!-- <divclass="flex max-w-xs flex-col items-start gap-2.5 rounded-lg border bg-white p-4 text-gray-500 shadow dark:bg-gray-800 dark:text-gray-400"role="alert">5 unmodified lines>Deploy dedicated</a></div> --><div class="mt-auto"><div class="mb-3 flex items-center justify-between gap-2"><labelfor="default-range"class="block text-sm font-medium text-gray-900 dark:text-white">API Quota</label><spanclass="rounded bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-300">Free</span><div class="ml-auto w-12 text-right text-sm">76%</div></div><div class="h-2 w-full rounded-full bg-gray-200 dark:bg-gray-700"><div class="h-2 rounded-full bg-black dark:bg-gray-400" style="width: 75%"></div></div></div></div></div>{/if}</div>
src/lib/components/Playground/Playground.svelte+53-39