diff --git a/CLAUDE.md b/CLAUDE.md index 52300bf563..ad7392921b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -CyberLover 是一个功能丰富的自托管 AI 平台,支持完全离线运行。核心技术栈: +Cakumi 是一个功能丰富的自托管 AI 平台,支持完全离线运行。核心技术栈: - **前端**: SvelteKit 4 + TypeScript + Vite 5 + Tailwind CSS 4 - **后端**: Python 3.11 + FastAPI + SQLAlchemy - **部署**: Docker 多阶段构建,生产环境前后端同容器运行 diff --git a/backend/open_webui/__init__.py b/backend/open_webui/__init__.py index 11c01c298a..9551d628c3 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"CyberLover version: {VERSION}") + typer.echo(f"Cakumi version: {VERSION}") raise typer.Exit() diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index d08e37f5a4..6510895171 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 (CyberLover + Ollama) + # if you use all-in-one docker container (Cakumi + 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 4b92737e23..253200e1fc 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", "CyberLover") -if WEBUI_NAME != "CyberLover": - WEBUI_NAME += " (CyberLover)" +WEBUI_NAME = os.environ.get("WEBUI_NAME", "Cakumi") +if WEBUI_NAME != "Cakumi": + WEBUI_NAME += " (Cakumi)" WEBUI_FAVICON_URL = "https://openwebui.com/favicon.png" diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index da9cb09662..901e4e76c6 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -634,14 +634,14 @@ async def lifespan(app: FastAPI): app = FastAPI( - title="CyberLover", + title="Cakumi", docs_url="/docs" if ENV == "dev" else None, openapi_url="/openapi.json" if ENV == "dev" else None, redoc_url=None, lifespan=lifespan, ) -# For CyberLover OIDC/OAuth2 +# For Cakumi OIDC/OAuth2 oauth_manager = OAuthManager(app) app.state.oauth_manager = oauth_manager @@ -2163,7 +2163,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 CyberLover. + Get current usage statistics for Cakumi. This is an experimental endpoint and subject to change. """ try: diff --git a/backend/open_webui/retrieval/loaders/external_web.py b/backend/open_webui/retrieval/loaders/external_web.py index ccd62141d4..9a10e1b493 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": "CyberLover (https://github.com/open-webui/open-webui) External Web Loader", + "User-Agent": "Cakumi (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 04d5b263b4..4cef2a68c7 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 CyberLover naming conventions for - collection names. If CyberLover changes how it generates collection names + WARNING: This mapping relies on current Cakumi naming conventions for + collection names. If Cakumi 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 5000fc7263..232ef53e55 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 CyberLover naming conventions for - collection names. If CyberLover changes how it generates collection names + WARNING: This mapping relies on current Cakumi naming conventions for + collection names. If Cakumi 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 066226b755..b58e5b6d08 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 CyberLover Knowledge. + AWS S3 Vector integration for Cakumi 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 CyberLover metadata + # Keep only the first 10 keys, prioritizing important ones based on actual Cakumi metadata important_keys = [ "text", # The actual document content "file_id", # File ID @@ -570,7 +570,7 @@ class S3VectorClient(VectorDBBase): ) # Return in GetResult format - # The CyberLover GetResult expects lists of lists, so we wrap each list + # The Cakumi 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 22989f785a..5e1101794f 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": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "Cakumi (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 872d730496..f7d1c52e11 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": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "Cakumi (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 7703302bc5..202dae8403 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": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "Cakumi (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 7b4a07aded..f64fd24a87 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": "CyberLover (https://github.com/open-webui/open-webui) RAG Bot", + "User-Agent": "Cakumi (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 df44c69295..9deb266077 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"CyberLover: Server Connection Error" + detail = f"Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error") + raise Exception(detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error") + raise Exception(detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: Server Connection Error", ) diff --git a/backend/open_webui/routers/ollama.py b/backend/open_webui/routers/ollama.py index 518054d4ed..76d2bfd182 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"CyberLover: Server Connection Error", + detail=f"Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if e else "Cakumi: 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="CyberLover: Server Connection Error" + status_code=500, detail="Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: 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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: Server Connection Error", ) @@ -1611,7 +1611,7 @@ async def get_openai_models( ] except Exception as e: log.exception(e) - error_detail = "CyberLover: Server Connection Error" + error_detail = "Cakumi: 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 2d19b06129..fe56e37ae4 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -137,7 +137,7 @@ async def get_headers_and_cookies( **( { "HTTP-Referer": "https://openwebui.com/", - "X-Title": "CyberLover", + "X-Title": "Cakumi", } if "openrouter.ai" in url else {} @@ -351,7 +351,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 "CyberLover: Server Connection Error", + detail=detail if detail else "Cakumi: Server Connection Error", ) except ValueError: @@ -625,7 +625,7 @@ async def get_models( # ClientError covers all aiohttp requests issues log.exception(f"Client error: {str(e)}") raise HTTPException( - status_code=500, detail="CyberLover: Server Connection Error" + status_code=500, detail="Cakumi: Server Connection Error" ) except Exception as e: log.exception(f"Unexpected error: {e}") @@ -722,12 +722,12 @@ async def verify_connection( # ClientError covers all aiohttp requests issues log.exception(f"Client error: {str(e)}") raise HTTPException( - status_code=500, detail="CyberLover: Server Connection Error" + status_code=500, detail="Cakumi: Server Connection Error" ) except Exception as e: log.exception(f"Unexpected error: {e}") raise HTTPException( - status_code=500, detail="CyberLover: Server Connection Error" + status_code=500, detail="Cakumi: Server Connection Error" ) @@ -1260,7 +1260,7 @@ async def generate_chat_completion( raise HTTPException( status_code=r.status if r else 500, - detail="CyberLover: Server Connection Error", + detail="Cakumi: Server Connection Error", ) finally: # === 14. 清理资源 === @@ -1344,7 +1344,7 @@ async def embeddings(request: Request, form_data: dict, user): log.exception(e) raise HTTPException( status_code=r.status if r else 500, - detail="CyberLover: Server Connection Error", + detail="Cakumi: Server Connection Error", ) finally: if not streaming: @@ -1437,7 +1437,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="CyberLover: Server Connection Error", + detail="Cakumi: Server Connection Error", ) finally: if not streaming: diff --git a/backend/open_webui/routers/scim.py b/backend/open_webui/routers/scim.py index 7b66e1da82..0e3863a59b 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 CyberLover +Experimental SCIM 2.0 Implementation for Cakumi 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/static/site.webmanifest b/backend/open_webui/static/site.webmanifest index b462eaa6dd..111728da40 100644 --- a/backend/open_webui/static/site.webmanifest +++ b/backend/open_webui/static/site.webmanifest @@ -1,6 +1,6 @@ { - "name": "CyberLover", - "short_name": "Lover", + "name": "Cakumi", + "short_name": "Cakumi", "icons": [ { "src": "/static/web-app-manifest-192x192.png", diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 730a77ff49..79d9efe907 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="CyberLover", + client_name="Cakumi", 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 c1aacd503d..4ccee72120 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 CyberLover. +"""OpenTelemetry metrics bootstrap for Cakumi. 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 f1d6a70726..d28ce9a72f 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 CyberLover frontend\n") + stderr.write(">>> Building Cakumi frontend\n") npm = shutil.which("npm") if npm is None: raise RuntimeError( - "NodeJS `npm` is required for building CyberLover but it was not found" + "NodeJS `npm` is required for building Cakumi 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 f2cc75625c..b57ba04098 100644 --- a/src/app.html +++ b/src/app.html @@ -108,7 +108,7 @@ })(); -