refac
This commit is contained in:
1 parent
1a97751e37
commit
b1d40f3409
3 files changed
+21
-16
No files matched your search
@@ -150,7 +150,7 @@
|
||||
<div>
|
||||
<Tooltip
|
||||
content={$i18n.t(
|
||||
"Default mode works with a wider range of models by calling tools once before execution. Native mode leverages the model's built-in tool-calling capabilities, but requires the model to inherently support this feature."
|
||||
"Native mode (default) leverages the model's built-in tool-calling capabilities. Legacy mode works with a wider range of models by calling tools once before execution via prompt injection."
|
||||
)}
|
||||
placement="top-start"
|
||||
className="inline-tooltip"
|
||||
@@ -162,12 +162,20 @@
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||
on:click={() => {
|
||||
params.function_calling = (params?.function_calling ?? null) === null ? 'native' : null;
|
||||
if ((params?.function_calling ?? null) === null) {
|
||||
params.function_calling = 'native';
|
||||
} else if (params.function_calling === 'native') {
|
||||
params.function_calling = 'legacy';
|
||||
} else {
|
||||
params.function_calling = null;
|
||||
}
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{#if params.function_calling === 'native'}
|
||||
<span class="ml-2 self-center">{$i18n.t('Native')}</span>
|
||||
{:else if params.function_calling === 'legacy'}
|
||||
<span class="ml-2 self-center">{$i18n.t('Legacy')}</span>
|
||||
{:else}
|
||||
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user