diff --git a/en/.doctrees/environment.pickle b/en/.doctrees/environment.pickle index d1f50abd5..2c5e3ccd5 100644 Binary files a/en/.doctrees/environment.pickle and b/en/.doctrees/environment.pickle differ diff --git a/en/.doctrees/index.doctree b/en/.doctrees/index.doctree index 73a3e4a3d..79eeef6d9 100644 Binary files a/en/.doctrees/index.doctree and b/en/.doctrees/index.doctree differ diff --git a/en/_modules/agentscope/constants.html b/en/_modules/agentscope/constants.html index bdb0c790d..0bdc29f2e 100644 --- a/en/_modules/agentscope/constants.html +++ b/en/_modules/agentscope/constants.html @@ -121,6 +121,7 @@

Source code for agentscope.constants

 # -*- coding: utf-8 -*-
 """ Some constants used in the project"""
+import os
 from numbers import Number
 from enum import IntEnum
 
@@ -140,7 +141,16 @@ 

Source code for agentscope.constants

 _DEFAULT_SUBDIR_CODE = "code"
 _DEFAULT_SUBDIR_FILE = "file"
 _DEFAULT_SUBDIR_INVOKE = "invoke"
-_DEFAULT_CACHE_DIR = str(Path.home() / ".cache" / "agentscope")
+_DEFAULT_CACHE_DIR = str(
+    Path(
+        os.environ.get(
+            "AS_HOME_PATH",
+            str(Path.home()),
+        ),
+    )
+    / ".cache"
+    / "agentscope",
+)
 _DEFAULT_CFG_NAME = ".config"
 _DEFAULT_IMAGE_NAME = "image_{}_{}.png"
 _DEFAULT_SQLITE_DB_NAME = "agentscope.db"
diff --git a/en/_modules/agentscope/studio/_app.html b/en/_modules/agentscope/studio/_app.html
index c05cc578b..71b7ef66b 100644
--- a/en/_modules/agentscope/studio/_app.html
+++ b/en/_modules/agentscope/studio/_app.html
@@ -148,6 +148,7 @@ 

Source code for agentscope.studio._app

 from flask_socketio import SocketIO, join_room, leave_room
 
 from ..constants import (
+    _DEFAULT_CACHE_DIR,
     _DEFAULT_SUBDIR_CODE,
     _DEFAULT_SUBDIR_INVOKE,
     FILE_SIZE_LIMIT,
@@ -165,7 +166,7 @@ 

Source code for agentscope.studio._app

 _app = Flask(__name__)
 
 # Set the cache directory
-_cache_dir = Path.home() / ".cache" / "agentscope-studio"
+_cache_dir = Path(_DEFAULT_CACHE_DIR) / "studio"
 _cache_db = _cache_dir / "agentscope.db"
 os.makedirs(str(_cache_dir), exist_ok=True)
 
diff --git a/zh_CN/.doctrees/environment.pickle b/zh_CN/.doctrees/environment.pickle
index fab82578e..da04f76a9 100644
Binary files a/zh_CN/.doctrees/environment.pickle and b/zh_CN/.doctrees/environment.pickle differ
diff --git a/zh_CN/.doctrees/index.doctree b/zh_CN/.doctrees/index.doctree
index 82b3f8a82..73679f20b 100644
Binary files a/zh_CN/.doctrees/index.doctree and b/zh_CN/.doctrees/index.doctree differ
diff --git a/zh_CN/_modules/agentscope/constants.html b/zh_CN/_modules/agentscope/constants.html
index b77592ceb..3b17bb0a1 100644
--- a/zh_CN/_modules/agentscope/constants.html
+++ b/zh_CN/_modules/agentscope/constants.html
@@ -124,6 +124,7 @@
   

agentscope.constants 源代码

 # -*- coding: utf-8 -*-
 """ Some constants used in the project"""
+import os
 from numbers import Number
 from enum import IntEnum
 
@@ -143,7 +144,16 @@ 

agentscope.constants 源代码

 _DEFAULT_SUBDIR_CODE = "code"
 _DEFAULT_SUBDIR_FILE = "file"
 _DEFAULT_SUBDIR_INVOKE = "invoke"
-_DEFAULT_CACHE_DIR = str(Path.home() / ".cache" / "agentscope")
+_DEFAULT_CACHE_DIR = str(
+    Path(
+        os.environ.get(
+            "AS_HOME_PATH",
+            str(Path.home()),
+        ),
+    )
+    / ".cache"
+    / "agentscope",
+)
 _DEFAULT_CFG_NAME = ".config"
 _DEFAULT_IMAGE_NAME = "image_{}_{}.png"
 _DEFAULT_SQLITE_DB_NAME = "agentscope.db"
diff --git a/zh_CN/_modules/agentscope/studio/_app.html b/zh_CN/_modules/agentscope/studio/_app.html
index 02016472e..90c4c689e 100644
--- a/zh_CN/_modules/agentscope/studio/_app.html
+++ b/zh_CN/_modules/agentscope/studio/_app.html
@@ -151,6 +151,7 @@ 

agentscope.studio._app 源代码

 from flask_socketio import SocketIO, join_room, leave_room
 
 from ..constants import (
+    _DEFAULT_CACHE_DIR,
     _DEFAULT_SUBDIR_CODE,
     _DEFAULT_SUBDIR_INVOKE,
     FILE_SIZE_LIMIT,
@@ -168,7 +169,7 @@ 

agentscope.studio._app 源代码

 _app = Flask(__name__)
 
 # Set the cache directory
-_cache_dir = Path.home() / ".cache" / "agentscope-studio"
+_cache_dir = Path(_DEFAULT_CACHE_DIR) / "studio"
 _cache_db = _cache_dir / "agentscope.db"
 os.makedirs(str(_cache_dir), exist_ok=True)