mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 15:25:29 +00:00
refac
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
This commit is contained in:
parent
b85cfdc90f
commit
ea883b2ed4
@ -1942,7 +1942,7 @@ async def generate_queries(form_data: dict, user=Depends(get_verified_user)):
|
|||||||
f"generating {type} queries using model {task_model_id} for user {user.email}"
|
f"generating {type} queries using model {task_model_id} for user {user.email}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if app.state.config.QUERY_GENERATION_PROMPT_TEMPLATE != "":
|
if (app.state.config.QUERY_GENERATION_PROMPT_TEMPLATE).strip() != "":
|
||||||
template = app.state.config.QUERY_GENERATION_PROMPT_TEMPLATE
|
template = app.state.config.QUERY_GENERATION_PROMPT_TEMPLATE
|
||||||
else:
|
else:
|
||||||
template = DEFAULT_QUERY_GENERATION_PROMPT_TEMPLATE
|
template = DEFAULT_QUERY_GENERATION_PROMPT_TEMPLATE
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
|
|
||||||
export let value = '';
|
export let value = '';
|
||||||
export let placeholder = '';
|
export let placeholder = '';
|
||||||
export let rows = 1;
|
|
||||||
export let required = false;
|
|
||||||
export let className =
|
export let className =
|
||||||
'w-full rounded-lg px-3 py-2 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none h-full';
|
'w-full rounded-lg px-3 py-2 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none h-full';
|
||||||
|
|
||||||
let textareaElement;
|
let textareaElement;
|
||||||
|
|
||||||
$: if (textareaElement) {
|
$: if (textareaElement) {
|
||||||
if (textareaElement.innerText !== value) {
|
if (textareaElement.innerText !== value && value !== '') {
|
||||||
textareaElement.innerText = value;
|
textareaElement.innerText = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -38,11 +36,12 @@
|
|||||||
style="field-sizing: content; -moz-user-select: text !important;"
|
style="field-sizing: content; -moz-user-select: text !important;"
|
||||||
on:input={() => {
|
on:input={() => {
|
||||||
const text = textareaElement.innerText;
|
const text = textareaElement.innerText;
|
||||||
if (text.trim() === '\n') {
|
if (text === '\n') {
|
||||||
value = '';
|
value = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
value = text.trim();
|
|
||||||
|
value = text;
|
||||||
}}
|
}}
|
||||||
on:paste={handlePaste}
|
on:paste={handlePaste}
|
||||||
data-placeholder={placeholder}
|
data-placeholder={placeholder}
|
||||||
|
Loading…
Reference in New Issue
Block a user