mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
Address PR feedback: error on stream=false for ChatGPT, fix auth file permissions
This commit is contained in:
parent
c0cc226b74
commit
5af3199f5a
4 changed files with 45 additions and 12 deletions
|
|
@ -51,7 +51,8 @@ def load_auth() -> Optional[Dict[str, Any]]:
|
|||
def save_auth(data: Dict[str, Any]):
|
||||
"""Save auth data to disk."""
|
||||
_ensure_auth_dir()
|
||||
with open(CHATGPT_AUTH_FILE, "w") as f:
|
||||
fd = os.open(CHATGPT_AUTH_FILE, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
|
||||
with os.fdopen(fd, "w") as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue