mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 19:40:50 +00:00
Some checks are pending
Development Build / extract-version (push) Waiting to run
Development Build / test-build-regular (push) Blocked by required conditions
Development Build / test-build-single (push) Blocked by required conditions
Development Build / summary (push) Blocked by required conditions
Configure tiktoken to cache tokenizer encodings in ./data/tiktoken-cache instead of using system temp directory. This prevents re-downloading encoding files on every container restart and improves startup time. Changes: - Add TIKTOKEN_CACHE_DIR configuration in config.py - Set TIKTOKEN_CACHE_DIR environment variable in token_utils.py - Bump version to 1.0.7
17 lines
461 B
Python
17 lines
461 B
Python
import os
|
|
|
|
# ROOT DATA FOLDER
|
|
DATA_FOLDER = "./data"
|
|
|
|
# LANGGRAPH CHECKPOINT FILE
|
|
sqlite_folder = f"{DATA_FOLDER}/sqlite-db"
|
|
os.makedirs(sqlite_folder, exist_ok=True)
|
|
LANGGRAPH_CHECKPOINT_FILE = f"{sqlite_folder}/checkpoints.sqlite"
|
|
|
|
# UPLOADS FOLDER
|
|
UPLOADS_FOLDER = f"{DATA_FOLDER}/uploads"
|
|
os.makedirs(UPLOADS_FOLDER, exist_ok=True)
|
|
|
|
# TIKTOKEN CACHE FOLDER
|
|
TIKTOKEN_CACHE_DIR = f"{DATA_FOLDER}/tiktoken-cache"
|
|
os.makedirs(TIKTOKEN_CACHE_DIR, exist_ok=True)
|