mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
commit
2dd0eaad73
5 changed files with 25 additions and 12 deletions
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
|
|
@ -73,4 +73,4 @@
|
|||
|
||||
### Contributor License Agreement
|
||||
|
||||
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
|
||||
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
|
||||
|
|
@ -337,10 +337,7 @@ async def speech(request: Request, user=Depends(get_verified_user)):
|
|||
timeout=timeout, trust_env=True
|
||||
) as session:
|
||||
r = await session.post(
|
||||
url=urljoin(
|
||||
request.app.state.config.TTS_OPENAI_API_BASE_URL,
|
||||
"/audio/speech",
|
||||
),
|
||||
url=f"{request.app.state.config.TTS_OPENAI_API_BASE_URL}/audio/speech",
|
||||
json=payload,
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
|
|
@ -468,10 +465,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
|
|||
timeout=timeout, trust_env=True
|
||||
) as session:
|
||||
async with session.post(
|
||||
urljoin(
|
||||
base_url or f"https://{region}.tts.speech.microsoft.com",
|
||||
"/cognitiveservices/v1",
|
||||
),
|
||||
(base_url or f"https://{region}.tts.speech.microsoft.com")
|
||||
+ "/cognitiveservices/v1",
|
||||
headers={
|
||||
"Ocp-Apim-Subscription-Key": request.app.state.config.TTS_API_KEY,
|
||||
"Content-Type": "application/ssml+xml",
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@
|
|||
{#each OPENAI_API_BASE_URLS as url, idx}
|
||||
<OpenAIConnection
|
||||
{url}
|
||||
key={OPENAI_API_KEYS[idx]}
|
||||
bind:key={OPENAI_API_KEYS[idx]}
|
||||
bind:config={OPENAI_API_CONFIGS[idx]}
|
||||
pipeline={pipelineUrls[url] ? true : false}
|
||||
onSubmit={() => {
|
||||
|
|
|
|||
|
|
@ -385,6 +385,9 @@
|
|||
}
|
||||
|
||||
await tick();
|
||||
text = await inputVariableHandler(text);
|
||||
await tick();
|
||||
|
||||
const chatInputContainer = document.getElementById('chat-input-container');
|
||||
if (chatInputContainer) {
|
||||
chatInputContainer.scrollTop = chatInputContainer.scrollHeight;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { getContext, createEventDispatcher, onMount } from 'svelte';
|
||||
import { getContext, createEventDispatcher, onMount, tick } from 'svelte';
|
||||
|
||||
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||
import Modal from '$lib/components/common/Modal.svelte';
|
||||
|
|
@ -8,9 +8,10 @@
|
|||
import { toast } from 'svelte-sonner';
|
||||
import { page } from '$app/stores';
|
||||
import { goto } from '$app/navigation';
|
||||
import { user } from '$lib/stores';
|
||||
|
||||
import Textarea from '$lib/components/common/Textarea.svelte';
|
||||
import Knowledge from '$lib/components/workspace/Models/Knowledge.svelte';
|
||||
import { user } from '$lib/stores';
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
export let show = false;
|
||||
|
|
@ -53,6 +54,19 @@
|
|||
};
|
||||
};
|
||||
|
||||
const focusInput = async () => {
|
||||
await tick();
|
||||
const input = document.getElementById('folder-name') as HTMLInputElement;
|
||||
if (input) {
|
||||
input.focus();
|
||||
input.select();
|
||||
}
|
||||
};
|
||||
|
||||
$: if (show) {
|
||||
focusInput();
|
||||
}
|
||||
|
||||
$: if (folder) {
|
||||
init();
|
||||
}
|
||||
|
|
@ -99,6 +113,7 @@
|
|||
|
||||
<div class="flex-1">
|
||||
<input
|
||||
id="folder-name"
|
||||
class="w-full text-sm bg-transparent placeholder:text-gray-300 dark:placeholder:text-gray-700 outline-hidden"
|
||||
type="text"
|
||||
bind:value={name}
|
||||
|
|
|
|||
Loading…
Reference in a new issue