{#each GENERATION_CONFIG_KEYS as key} {@const { label, min, step } = GENERATION_CONFIG_SETTINGS[key]} {@const isMaxTokens = key === "max_tokens"} {@const max = isMaxTokens ? maxTokens : GENERATION_CONFIG_SETTINGS[key].max}
{label}
{#if !isMaxTokens || isNumber(conversation.data.config[key])}
conversation.data.config[key], v => updateConfigKey(key, v)} /> {/if} {#if isMaxTokens && isNumber(conversation.data.config[key])}
updateConfigKey(key, undefined)}>
{:else if isMaxTokens}
updateConfigKey(key, maxTokens / 2)}> set
{/if}
{#if !isMaxTokens || isNumber(conversation.data.config[key])}
conversation.data.config[key], v => updateConfigKey(key, v)} class="h-2 w-full cursor-pointer appearance-none rounded-lg bg-gray-200 accent-black dark:bg-gray-700 dark:accent-blue-500" /> {/if}
{/each}
conversation.data.streaming, v => conversation.update({ streaming: v })} class="peer sr-only" />
Streaming
Structured Output
conversation.data.structuredOutput?.enabled, v => conversation.update({ structuredOutput: { ...conversation.data.structuredOutput, enabled: v ?? false } }) } class="peer sr-only" id="structured-output" />
(editingStructuredOutput = true)}> edit