2023-02-09 16:02:56 +00:00
|
|
|
import os
|
|
|
|
from modules import utilities as util
|
|
|
|
|
|
|
|
user_dir = r'.user'
|
|
|
|
|
|
|
|
|
|
|
|
def create():
|
|
|
|
# create brain data
|
2023-02-09 17:14:50 +00:00
|
|
|
util.create_json_not_exist(f'{user_dir}/brain-data.json', [])
|
2023-02-09 17:28:05 +00:00
|
|
|
print(f'brain data created: {user_dir}/brain-data.json')
|
2023-02-09 16:02:56 +00:00
|
|
|
# create brain memo
|
|
|
|
util.create_json_not_exist(f'{user_dir}/brain-memo.json',
|
2023-02-10 13:31:34 +00:00
|
|
|
{'note_dir': '', 'delimiter': '', 'append_mode': False, 'force_mode': False})
|
2023-02-09 17:28:05 +00:00
|
|
|
print(f'brain memo file created: {user_dir}/brain-memo.json')
|
2023-02-09 17:05:34 +00:00
|
|
|
|
2023-02-23 09:40:22 +00:00
|
|
|
util.create_file_not_exist(f'{user_dir}/input.txt', '')
|
|
|
|
print(f'input file created: {user_dir}/input.txt')
|
|
|
|
|
|
|
|
if not os.path.exists(f'{user_dir}/API-KEYS.txt'):
|
|
|
|
print('Create API profile...')
|
|
|
|
api_key = input('Enter your OpenAI API key: ')
|
|
|
|
util.create_file_not_exist(f'{user_dir}/API-KEYS.txt', api_key)
|
|
|
|
print(f'API key file created: {user_dir}/API-KEYS.txt')
|
|
|
|
|
2023-02-19 15:27:00 +00:00
|
|
|
|
2023-02-09 17:05:34 +00:00
|
|
|
create()
|