diff --git a/backend/open_webui/__init__.py b/backend/open_webui/__init__.py index 967a49de8f..11c01c298a 100644 --- a/backend/open_webui/__init__.py +++ b/backend/open_webui/__init__.py @@ -17,7 +17,7 @@ def version_callback(value: bool): if value: from open_webui.env import VERSION - typer.echo(f"Open WebUI version: {VERSION}") + typer.echo(f"CyberLover version: {VERSION}") raise typer.Exit() diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index f7926abe85..d08e37f5a4 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -975,7 +975,7 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "": if ENV == "prod": if OLLAMA_BASE_URL == "/ollama" and not K8S_FLAG: if USE_OLLAMA_DOCKER.lower() == "true": - # if you use all-in-one docker container (Open WebUI + Ollama) + # if you use all-in-one docker container (CyberLover + Ollama) # with the docker build arg USE_OLLAMA=true (--build-arg="USE_OLLAMA=true") this only works with http://localhost:11434 OLLAMA_BASE_URL = "http://localhost:11434" else: diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py index 8f9c1fbc44..4c813a8ae6 100644 --- a/backend/open_webui/env.py +++ b/backend/open_webui/env.py @@ -110,9 +110,9 @@ for source in log_sources: log.setLevel(SRC_LOG_LEVELS["CONFIG"]) -WEBUI_NAME = os.environ.get("WEBUI_NAME", "Open WebUI") -if WEBUI_NAME != "Open WebUI": - WEBUI_NAME += " (Open WebUI)" +WEBUI_NAME = os.environ.get("WEBUI_NAME", "CyberLover") +if WEBUI_NAME != "CyberLover": + WEBUI_NAME += " (CyberLover)" WEBUI_FAVICON_URL = "https://openwebui.com/favicon.png" diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 9998af0e73..c3ccf2547f 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -609,14 +609,14 @@ async def lifespan(app: FastAPI): app = FastAPI( - title="Open WebUI", + title="CyberLover", docs_url="/docs" if ENV == "dev" else None, openapi_url="/openapi.json" if ENV == "dev" else None, redoc_url=None, lifespan=lifespan, ) -# For Open WebUI OIDC/OAuth2 +# For CyberLover OIDC/OAuth2 oauth_manager = OAuthManager(app) app.state.oauth_manager = oauth_manager @@ -1916,7 +1916,7 @@ async def get_app_changelog(): @app.get("/api/usage") async def get_current_usage(user=Depends(get_verified_user)): """ - Get current usage statistics for Open WebUI. + Get current usage statistics for CyberLover. This is an experimental endpoint and subject to change. """ try: diff --git a/backend/open_webui/models/users.py b/backend/open_webui/models/users.py index 8338d17500..d54ed4a72c 100644 --- a/backend/open_webui/models/users.py +++ b/backend/open_webui/models/users.py @@ -168,6 +168,7 @@ class UsersTable: "email": email, "role": role, "profile_image_url": profile_image_url, + # AI-Friend, 默认启用记忆功能 "settings": {"ui": {"memory": True}}, "last_active_at": int(time.time()), "created_at": int(time.time()), diff --git a/backend/open_webui/retrieval/loaders/external_web.py b/backend/open_webui/retrieval/loaders/external_web.py index 68ed66162b..ccd62141d4 100644 --- a/backend/open_webui/retrieval/loaders/external_web.py +++ b/backend/open_webui/retrieval/loaders/external_web.py @@ -32,7 +32,7 @@ class ExternalWebLoader(BaseLoader): response = requests.post( self.external_url, headers={ - "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) External Web Loader", + "User-Agent": "CyberLover (https://github.com/open-webui/open-webui) External Web Loader", "Authorization": f"Bearer {self.external_api_key}", }, json={ diff --git a/backend/open_webui/retrieval/vector/dbs/milvus_multitenancy.py b/backend/open_webui/retrieval/vector/dbs/milvus_multitenancy.py index 5c80d155d3..04d5b263b4 100644 --- a/backend/open_webui/retrieval/vector/dbs/milvus_multitenancy.py +++ b/backend/open_webui/retrieval/vector/dbs/milvus_multitenancy.py @@ -63,8 +63,8 @@ class MilvusClient(VectorDBBase): """ Maps the traditional collection name to multi-tenant collection and resource ID. - WARNING: This mapping relies on current Open WebUI naming conventions for - collection names. If Open WebUI changes how it generates collection names + WARNING: This mapping relies on current CyberLover naming conventions for + collection names. If CyberLover changes how it generates collection names (e.g., "user-memory-" prefix, "file-" prefix, web search patterns, or hash formats), this mapping will break and route data to incorrect collections. POTENTIALLY CAUSING HUGE DATA CORRUPTION, DATA CONSISTENCY ISSUES AND INCORRECT diff --git a/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py b/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py index e9fa03d459..5000fc7263 100644 --- a/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py +++ b/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py @@ -106,8 +106,8 @@ class QdrantClient(VectorDBBase): Returns: tuple: (collection_name, tenant_id) - WARNING: This mapping relies on current Open WebUI naming conventions for - collection names. If Open WebUI changes how it generates collection names + WARNING: This mapping relies on current CyberLover naming conventions for + collection names. If CyberLover changes how it generates collection names (e.g., "user-memory-" prefix, "file-" prefix, web search patterns, or hash formats), this mapping will break and route data to incorrect collections. POTENTIALLY CAUSING HUGE DATA CORRUPTION, DATA CONSISTENCY ISSUES AND INCORRECT diff --git a/backend/open_webui/retrieval/vector/dbs/s3vector.py b/backend/open_webui/retrieval/vector/dbs/s3vector.py index 519ee5abad..066226b755 100644 --- a/backend/open_webui/retrieval/vector/dbs/s3vector.py +++ b/backend/open_webui/retrieval/vector/dbs/s3vector.py @@ -17,7 +17,7 @@ log.setLevel(SRC_LOG_LEVELS["RAG"]) class S3VectorClient(VectorDBBase): """ - AWS S3 Vector integration for Open WebUI Knowledge. + AWS S3 Vector integration for CyberLover Knowledge. """ def __init__(self): @@ -80,7 +80,7 @@ class S3VectorClient(VectorDBBase): if not isinstance(metadata, dict) or len(metadata) <= 10: return metadata - # Keep only the first 10 keys, prioritizing important ones based on actual Open WebUI metadata + # Keep only the first 10 keys, prioritizing important ones based on actual CyberLover metadata important_keys = [ "text", # The actual document content "file_id", # File ID @@ -570,7 +570,7 @@ class S3VectorClient(VectorDBBase): ) # Return in GetResult format - # The Open WebUI GetResult expects lists of lists, so we wrap each list + # The CyberLover GetResult expects lists of lists, so we wrap each list if all_ids: return GetResult( ids=[all_ids], documents=[all_documents], metadatas=[all_metadatas] diff --git a/backend/open_webui/retrieval/web/external.py b/backend/open_webui/retrieval/web/external.py index a5c8003e47..22989f785a 100644 --- a/backend/open_webui/retrieval/web/external.py +++ b/backend/open_webui/retrieval/web/external.py @@ -20,7 +20,7 @@ def search_external( response = requests.post( external_url, headers={ - "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", "Authorization": f"Bearer {external_api_key}", }, json={ diff --git a/backend/open_webui/retrieval/web/firecrawl.py b/backend/open_webui/retrieval/web/firecrawl.py index a85fc51fbd..872d730496 100644 --- a/backend/open_webui/retrieval/web/firecrawl.py +++ b/backend/open_webui/retrieval/web/firecrawl.py @@ -22,7 +22,7 @@ def search_firecrawl( response = requests.post( firecrawl_search_url, headers={ - "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", "Authorization": f"Bearer {firecrawl_api_key}", }, json={ diff --git a/backend/open_webui/retrieval/web/searxng.py b/backend/open_webui/retrieval/web/searxng.py index 15e3c098a9..7703302bc5 100644 --- a/backend/open_webui/retrieval/web/searxng.py +++ b/backend/open_webui/retrieval/web/searxng.py @@ -67,7 +67,7 @@ def search_searxng( response = requests.get( query_url, headers={ - "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", "Accept": "text/html", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-US,en;q=0.5", diff --git a/backend/open_webui/retrieval/web/yacy.py b/backend/open_webui/retrieval/web/yacy.py index bc61425cbc..7b4a07aded 100644 --- a/backend/open_webui/retrieval/web/yacy.py +++ b/backend/open_webui/retrieval/web/yacy.py @@ -61,7 +61,7 @@ def search_yacy( query_url, auth=yacy_auth, headers={ - "User-Agent": "Open WebUI (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", "Accept": "text/html", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-US,en;q=0.5", diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index cb7a57b5b7..df44c69295 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -381,7 +381,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): detail = None status_code = 500 - detail = f"Open WebUI: Server Connection Error" + detail = f"CyberLover: Server Connection Error" if r is not None: status_code = r.status @@ -450,7 +450,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): raise HTTPException( status_code=getattr(r, "status", 500) if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) elif request.app.state.config.TTS_ENGINE == "azure": @@ -509,7 +509,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): raise HTTPException( status_code=getattr(r, "status", 500) if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) elif request.app.state.config.TTS_ENGINE == "transformers": @@ -637,7 +637,7 @@ def transcription_handler(request, file_path, metadata): except Exception: detail = f"External: {e}" - raise Exception(detail if detail else "Open WebUI: Server Connection Error") + raise Exception(detail if detail else "CyberLover: Server Connection Error") elif request.app.state.config.STT_ENGINE == "deepgram": try: @@ -708,7 +708,7 @@ def transcription_handler(request, file_path, metadata): detail = f"External: {res['error'].get('message', '')}" except Exception: detail = f"External: {e}" - raise Exception(detail if detail else "Open WebUI: Server Connection Error") + raise Exception(detail if detail else "CyberLover: Server Connection Error") elif request.app.state.config.STT_ENGINE == "azure": # Check file exists and size @@ -825,7 +825,7 @@ def transcription_handler(request, file_path, metadata): raise HTTPException( status_code=getattr(r, "status_code", 500) if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) diff --git a/backend/open_webui/routers/ollama.py b/backend/open_webui/routers/ollama.py index 64b0687afa..518054d4ed 100644 --- a/backend/open_webui/routers/ollama.py +++ b/backend/open_webui/routers/ollama.py @@ -170,7 +170,7 @@ async def send_post_request( log.error(f"Failed to parse error response: {e}") raise HTTPException( status_code=r.status, - detail=f"Open WebUI: Server Connection Error", + detail=f"CyberLover: Server Connection Error", ) r.raise_for_status() # Raises an error for bad responses (4xx, 5xx) @@ -199,7 +199,7 @@ async def send_post_request( raise HTTPException( status_code=r.status if r else 500, - detail=detail if e else "Open WebUI: Server Connection Error", + detail=detail if e else "CyberLover: Server Connection Error", ) finally: if not stream: @@ -276,7 +276,7 @@ async def verify_connection( except aiohttp.ClientError as e: log.exception(f"Client error: {str(e)}") raise HTTPException( - status_code=500, detail="Open WebUI: Server Connection Error" + status_code=500, detail="CyberLover: Server Connection Error" ) except Exception as e: log.exception(f"Unexpected error: {e}") @@ -503,7 +503,7 @@ async def get_ollama_tags( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) if user.role == "user" and not BYPASS_MODEL_ACCESS_CONTROL: @@ -641,7 +641,7 @@ async def get_ollama_versions(request: Request, url_idx: Optional[int] = None): raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) else: return {"version": False} @@ -875,7 +875,7 @@ async def copy_model( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) @@ -945,7 +945,7 @@ async def delete_model( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) @@ -1009,7 +1009,7 @@ async def show_model_info( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) @@ -1101,7 +1101,7 @@ async def embed( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) @@ -1188,7 +1188,7 @@ async def embeddings( raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) @@ -1611,7 +1611,7 @@ async def get_openai_models( ] except Exception as e: log.exception(e) - error_detail = "Open WebUI: Server Connection Error" + error_detail = "CyberLover: Server Connection Error" if r is not None: try: res = r.json() diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index 8c5e3da736..47b6ac601a 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -135,7 +135,7 @@ async def get_headers_and_cookies( **( { "HTTP-Referer": "https://openwebui.com/", - "X-Title": "Open WebUI", + "X-Title": "CyberLover", } if "openrouter.ai" in url else {} @@ -349,7 +349,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): raise HTTPException( status_code=r.status_code if r else 500, - detail=detail if detail else "Open WebUI: Server Connection Error", + detail=detail if detail else "CyberLover: Server Connection Error", ) except ValueError: @@ -623,7 +623,7 @@ async def get_models( # ClientError covers all aiohttp requests issues log.exception(f"Client error: {str(e)}") raise HTTPException( - status_code=500, detail="Open WebUI: Server Connection Error" + status_code=500, detail="CyberLover: Server Connection Error" ) except Exception as e: log.exception(f"Unexpected error: {e}") @@ -720,12 +720,12 @@ async def verify_connection( # ClientError covers all aiohttp requests issues log.exception(f"Client error: {str(e)}") raise HTTPException( - status_code=500, detail="Open WebUI: Server Connection Error" + status_code=500, detail="CyberLover: Server Connection Error" ) except Exception as e: log.exception(f"Unexpected error: {e}") raise HTTPException( - status_code=500, detail="Open WebUI: Server Connection Error" + status_code=500, detail="CyberLover: Server Connection Error" ) @@ -973,7 +973,7 @@ async def generate_chat_completion( raise HTTPException( status_code=r.status if r else 500, - detail="Open WebUI: Server Connection Error", + detail="CyberLover: Server Connection Error", ) finally: if not streaming: @@ -1055,7 +1055,7 @@ async def embeddings(request: Request, form_data: dict, user): log.exception(e) raise HTTPException( status_code=r.status if r else 500, - detail="Open WebUI: Server Connection Error", + detail="CyberLover: Server Connection Error", ) finally: if not streaming: @@ -1148,7 +1148,7 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)): log.exception(e) raise HTTPException( status_code=r.status if r else 500, - detail="Open WebUI: Server Connection Error", + detail="CyberLover: Server Connection Error", ) finally: if not streaming: diff --git a/backend/open_webui/routers/scim.py b/backend/open_webui/routers/scim.py index de1b979c86..7b66e1da82 100644 --- a/backend/open_webui/routers/scim.py +++ b/backend/open_webui/routers/scim.py @@ -1,5 +1,5 @@ """ -Experimental SCIM 2.0 Implementation for Open WebUI +Experimental SCIM 2.0 Implementation for CyberLover Provides System for Cross-domain Identity Management endpoints for users and groups NOTE: This is an experimental implementation and may not fully comply with SCIM 2.0 standards, and is subject to change. diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index e0bf7582c6..730a77ff49 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -241,7 +241,7 @@ async def get_oauth_client_info_with_dynamic_client_registration( ).rstrip("/") oauth_client_metadata = OAuthClientMetadata( - client_name="Open WebUI", + client_name="CyberLover", redirect_uris=[f"{redirect_base_url}/oauth/clients/{client_id}/callback"], grant_types=["authorization_code", "refresh_token"], response_types=["code"], diff --git a/backend/open_webui/utils/telemetry/metrics.py b/backend/open_webui/utils/telemetry/metrics.py index c7b47c0231..c1aacd503d 100644 --- a/backend/open_webui/utils/telemetry/metrics.py +++ b/backend/open_webui/utils/telemetry/metrics.py @@ -1,4 +1,4 @@ -"""OpenTelemetry metrics bootstrap for Open WebUI. +"""OpenTelemetry metrics bootstrap for CyberLover. This module initialises a MeterProvider that sends metrics to an OTLP collector. The collector is responsible for exposing a Prometheus diff --git a/hatch_build.py b/hatch_build.py index 28aad1b6cd..f1d6a70726 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -10,11 +10,11 @@ from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomBuildHook(BuildHookInterface): def initialize(self, version, build_data): super().initialize(version, build_data) - stderr.write(">>> Building Open Webui frontend\n") + stderr.write(">>> Building CyberLover frontend\n") npm = shutil.which("npm") if npm is None: raise RuntimeError( - "NodeJS `npm` is required for building Open Webui but it was not found" + "NodeJS `npm` is required for building CyberLover but it was not found" ) stderr.write("### npm install\n") subprocess.run([npm, "install", "--force"], check=True) # noqa: S603 diff --git a/src/app.html b/src/app.html index 6c1c362005..f2cc75625c 100644 --- a/src/app.html +++ b/src/app.html @@ -108,7 +108,7 @@ })(); -