mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 10:15:27 -04:00
Add native Windows compatibility layer
This commit is contained in:
@@ -86,7 +86,7 @@ def _load_custom_endpoint() -> dict:
|
||||
"""Load the saved custom embedding endpoint, if any."""
|
||||
try:
|
||||
if os.path.exists(_ENDPOINT_FILE):
|
||||
return json.loads(Path(_ENDPOINT_FILE).read_text())
|
||||
return json.loads(Path(_ENDPOINT_FILE).read_text(encoding="utf-8"))
|
||||
except Exception:
|
||||
pass
|
||||
return {}
|
||||
@@ -94,7 +94,7 @@ def _load_custom_endpoint() -> dict:
|
||||
|
||||
def _save_custom_endpoint(data: dict):
|
||||
Path(_ENDPOINT_FILE).parent.mkdir(parents=True, exist_ok=True)
|
||||
Path(_ENDPOINT_FILE).write_text(json.dumps(data, indent=2))
|
||||
Path(_ENDPOINT_FILE).write_text(json.dumps(data, indent=2), encoding="utf-8")
|
||||
|
||||
|
||||
def setup_embedding_routes():
|
||||
|
||||
Reference in New Issue
Block a user