"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "683650ec00f6f619de4fb31ba687da783de499ec"
Unverified Commit 33bb787b authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #3095 from open-webui/dev

refac
parents 95ff3557 c794d59f
...@@ -25,6 +25,7 @@ def search_searxng( ...@@ -25,6 +25,7 @@ def search_searxng(
Keyword Args: Keyword Args:
language (str): Language filter for the search results; e.g., "en-US". Defaults to an empty string. language (str): Language filter for the search results; e.g., "en-US". Defaults to an empty string.
safesearch (int): Safe search filter for safer web results; 0 = off, 1 = moderate, 2 = strict. Defaults to 1 (moderate).
time_range (str): Time range for filtering results by date; e.g., "2023-04-05..today" or "all-time". Defaults to ''. time_range (str): Time range for filtering results by date; e.g., "2023-04-05..today" or "all-time". Defaults to ''.
categories: (Optional[List[str]]): Specific categories within which the search should be performed, defaulting to an empty string if not provided. categories: (Optional[List[str]]): Specific categories within which the search should be performed, defaulting to an empty string if not provided.
...@@ -37,6 +38,7 @@ def search_searxng( ...@@ -37,6 +38,7 @@ def search_searxng(
# Default values for optional parameters are provided as empty strings or None when not specified. # Default values for optional parameters are provided as empty strings or None when not specified.
language = kwargs.get("language", "en-US") language = kwargs.get("language", "en-US")
safesearch = kwargs.get("safesearch", "1")
time_range = kwargs.get("time_range", "") time_range = kwargs.get("time_range", "")
categories = "".join(kwargs.get("categories", [])) categories = "".join(kwargs.get("categories", []))
...@@ -44,6 +46,7 @@ def search_searxng( ...@@ -44,6 +46,7 @@ def search_searxng(
"q": query, "q": query,
"format": "json", "format": "json",
"pageno": 1, "pageno": 1,
"safesearch": safesearch,
"language": language, "language": language,
"time_range": time_range, "time_range": time_range,
"categories": categories, "categories": categories,
......
...@@ -935,7 +935,7 @@ ...@@ -935,7 +935,7 @@
} }
// check if user has access to getUserMedia // check if user has access to getUserMedia
try { try {
await navigator.mediaDevices.getUserMedia({ audio: true, video: true }); await navigator.mediaDevices.getUserMedia({ audio: true });
// If the user grants the permission, proceed to show the call overlay // If the user grants the permission, proceed to show the call overlay
showCallOverlay.set(true); showCallOverlay.set(true);
......
...@@ -626,7 +626,8 @@ ...@@ -626,7 +626,8 @@
<button <button
class=" p-3 rounded-full bg-gray-50 dark:bg-gray-900" class=" p-3 rounded-full bg-gray-50 dark:bg-gray-900"
type="button" type="button"
on:click={() => { on:click={async () => {
await navigator.mediaDevices.getUserMedia({ video: true });
startCamera(); startCamera();
}} }}
> >
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment