-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved dir creation to GPTerminator.py
- Loading branch information
1 parent
c1142f9
commit e637e5b
Showing
1 changed file
with
0 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,3 @@ | ||
from setuptools import setup | ||
import os | ||
import configparser | ||
|
||
|
||
if "APPDATA" in os.environ: | ||
confighome = os.environ["APPDATA"] | ||
elif "XDG_CONFIG_HOME" in os.environ: | ||
confighome = os.environ["XDG_CONFIG_HOME"] | ||
else: | ||
confighome = os.path.join(os.environ["HOME"], ".config") | ||
configpath = os.path.join(confighome, "gpterminator") | ||
if not os.path.exists(configpath): | ||
os.mkdir(configpath) | ||
savespath = os.path.join(configpath, "saves") | ||
if not os.path.exists(savespath): | ||
os.mkdir(savespath) | ||
|
||
config = configparser.ConfigParser() | ||
config["SELECTED_CONFIG"] = {"configname": "BASE_CONFIG"} | ||
config["BASE_CONFIG"] = { | ||
"ModelName": "gpt-3.5-turbo", | ||
"Temperature": "1", | ||
"PresencePenalty": "0", | ||
"FrequencyPenalty": "0", | ||
"SystemMessage": "You are a helpful assistant named GPTerminator.", | ||
"CommandInitiator": "!", | ||
"SavePath": f"{savespath}", | ||
} | ||
with open(os.path.join(configpath, "config.ini"), "w") as configfile: | ||
config.write(configfile) | ||
|
||
setup() |