feat: voice mode prompt template
This commit is contained in:
@@ -41,7 +41,8 @@
|
||||
ENABLE_SEARCH_QUERY_GENERATION: true,
|
||||
ENABLE_RETRIEVAL_QUERY_GENERATION: true,
|
||||
QUERY_GENERATION_PROMPT_TEMPLATE: '',
|
||||
TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE: ''
|
||||
TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE: '',
|
||||
VOICE_MODE_PROMPT_TEMPLATE: ''
|
||||
};
|
||||
|
||||
let promptSuggestions = [];
|
||||
@@ -237,6 +238,41 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="mb-2.5 flex w-full items-center justify-between">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
{$i18n.t('Voice Mode Custom Prompt')}
|
||||
</div>
|
||||
|
||||
<Switch
|
||||
state={taskConfig.VOICE_MODE_PROMPT_TEMPLATE != null}
|
||||
on:change={(e) => {
|
||||
if (e.detail) {
|
||||
taskConfig.VOICE_MODE_PROMPT_TEMPLATE = '';
|
||||
} else {
|
||||
taskConfig.VOICE_MODE_PROMPT_TEMPLATE = null;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{#if taskConfig.VOICE_MODE_PROMPT_TEMPLATE != null}
|
||||
<div class="mb-2.5">
|
||||
<div class=" mb-1 text-xs font-medium">{$i18n.t('Voice Mode Prompt')}</div>
|
||||
|
||||
<Tooltip
|
||||
content={$i18n.t('Leave empty to use the default prompt, or enter a custom prompt')}
|
||||
placement="top-start"
|
||||
>
|
||||
<Textarea
|
||||
bind:value={taskConfig.VOICE_MODE_PROMPT_TEMPLATE}
|
||||
placeholder={$i18n.t(
|
||||
'Leave empty to use the default prompt, or enter a custom prompt'
|
||||
)}
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="mb-2.5 flex w-full items-center justify-between">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
{$i18n.t('Follow Up Generation')}
|
||||
|
||||
@@ -1792,6 +1792,7 @@
|
||||
|
||||
if ($config?.features)
|
||||
features = {
|
||||
voice: $showCallOverlay,
|
||||
image_generation:
|
||||
$config?.features?.enable_image_generation &&
|
||||
($user?.role === 'admin' || $user?.permissions?.features?.image_generation)
|
||||
|
||||
Reference in New Issue
Block a user