mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 22:09:51 +00:00
changes to the UI to support native_tool_call param
This commit is contained in:
parent
3724e888c6
commit
25ce18d876
@ -1094,8 +1094,14 @@
|
||||
$settings?.params?.stream_response ??
|
||||
params?.stream_response ??
|
||||
true;
|
||||
const native_tool_call =
|
||||
model?.info?.params?.native_tool_call ??
|
||||
$settings?.params?.native_tool_call ??
|
||||
params?.native_tool_call ??
|
||||
true;
|
||||
const [res, controller] = await generateChatCompletion(localStorage.token, {
|
||||
stream: stream,
|
||||
native_tool_call: native_tool_call,
|
||||
model: model.id,
|
||||
messages: messagesBody,
|
||||
options: {
|
||||
@ -1419,10 +1425,17 @@
|
||||
params?.stream_response ??
|
||||
true;
|
||||
|
||||
const native_tool_call =
|
||||
model?.info?.params?.native_tool_call ??
|
||||
$settings?.params?.native_tool_call ??
|
||||
params?.native_tool_call ??
|
||||
true;
|
||||
|
||||
const [res, controller] = await generateOpenAIChatCompletion(
|
||||
localStorage.token,
|
||||
{
|
||||
stream: stream,
|
||||
native_tool_call : native_tool_call,
|
||||
model: model.id,
|
||||
...(stream && (model.info?.meta?.capabilities?.usage ?? false)
|
||||
? {
|
||||
|
@ -11,6 +11,7 @@
|
||||
export let params = {
|
||||
// Advanced
|
||||
stream_response: null, // Set stream responses for this model individually
|
||||
native_tool_call: null,
|
||||
seed: null,
|
||||
stop: null,
|
||||
temperature: null,
|
||||
@ -71,6 +72,36 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
{$i18n.t('Native Tool Calls')}
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded transition"
|
||||
on:click={() => {
|
||||
params.native_tool_call=
|
||||
(params?.native_tool_call?? null) === null
|
||||
? true
|
||||
: params.native_tool_call
|
||||
? false
|
||||
: null;
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{#if params.native_tool_call === true}
|
||||
<span class="ml-2 self-center">{$i18n.t('On')}</span>
|
||||
{:else if params.native_tool_call === false}
|
||||
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
|
||||
{:else}
|
||||
<span class="ml-2 self-center">{$i18n.t('Default')}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class=" py-0.5 w-full justify-between">
|
||||
<div class="flex w-full justify-between">
|
||||
|
Loading…
Reference in New Issue
Block a user