mirror of
https://github.com/open-webui/open-webui
synced 2025-02-07 13:34:55 +00:00
refac
This commit is contained in:
parent
42e8d8ce49
commit
ad93341b74
@ -5,12 +5,31 @@ from pathlib import Path
|
|||||||
|
|
||||||
import typer
|
import typer
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
from typing import Optional
|
||||||
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
app = typer.Typer()
|
app = typer.Typer()
|
||||||
|
|
||||||
KEY_FILE = Path.cwd() / ".webui_secret_key"
|
KEY_FILE = Path.cwd() / ".webui_secret_key"
|
||||||
|
|
||||||
|
|
||||||
|
def version_callback(value: bool):
|
||||||
|
if value:
|
||||||
|
from open_webui.env import VERSION
|
||||||
|
|
||||||
|
typer.echo(f"Open WebUI version: {VERSION}")
|
||||||
|
raise typer.Exit()
|
||||||
|
|
||||||
|
|
||||||
|
@app.command()
|
||||||
|
def main(
|
||||||
|
version: Annotated[
|
||||||
|
Optional[bool], typer.Option("--version", callback=version_callback)
|
||||||
|
] = None,
|
||||||
|
):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
def serve(
|
def serve(
|
||||||
host: str = "0.0.0.0",
|
host: str = "0.0.0.0",
|
||||||
|
@ -47,6 +47,8 @@ pymilvus==2.5.0
|
|||||||
qdrant-client~=1.12.0
|
qdrant-client~=1.12.0
|
||||||
opensearch-py==2.7.1
|
opensearch-py==2.7.1
|
||||||
|
|
||||||
|
|
||||||
|
transformers
|
||||||
sentence-transformers==3.3.1
|
sentence-transformers==3.3.1
|
||||||
colbert-ai==0.2.21
|
colbert-ai==0.2.21
|
||||||
einops==0.8.0
|
einops==0.8.0
|
||||||
|
@ -54,6 +54,7 @@ dependencies = [
|
|||||||
"qdrant-client~=1.12.0",
|
"qdrant-client~=1.12.0",
|
||||||
"opensearch-py==2.7.1",
|
"opensearch-py==2.7.1",
|
||||||
|
|
||||||
|
"transformers",
|
||||||
"sentence-transformers==3.3.1",
|
"sentence-transformers==3.3.1",
|
||||||
"colbert-ai==0.2.21",
|
"colbert-ai==0.2.21",
|
||||||
"einops==0.8.0",
|
"einops==0.8.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user