Skip to content

Commit

Permalink
v6.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BBC-Esq authored Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a8f5252 commit a78b4f3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/setup_windows.py
Original file line number Diff line number Diff line change
@@ -469,9 +469,34 @@ def download_kobold():

download_kobold()

# 9. update config.yaml to include jeeves database
def update_config_yaml():
import yaml
script_dir = os.path.dirname(os.path.abspath(__file__))
config_path = os.path.join(script_dir, 'config.yaml')

with open(config_path, 'r', encoding='utf-8') as file:
config = yaml.safe_load(file)

vector_model_path = os.path.join(script_dir, 'Models', 'vector', 'thenlper--gte-base')

if 'created_databases' not in config:
config['created_databases'] = {}
if 'user_manual' not in config['created_databases']:
config['created_databases']['user_manual'] = {}

config['created_databases']['user_manual']['chunk_overlap'] = 349
config['created_databases']['user_manual']['chunk_size'] = 700
config['created_databases']['user_manual']['model'] = vector_model_path

with open(config_path, 'w', encoding='utf-8') as file:
yaml.dump(config, file, default_flow_style=False)

update_config_yaml()

end_time = time.time()
total_time = end_time - start_time
hours, rem = divmod(total_time, 3600)
minutes, seconds = divmod(rem, 60)

print(f"\033[92m\nTotal installation time: {int(hours):02d}:{int(minutes):02d}:{seconds:05.2f}\033[0m")
print(f"\033[92m\nTotal installation time: {int(hours):02d}:{int(minutes):02d}:{seconds:05.2f}\033[0m")

0 comments on commit a78b4f3

Please sign in to comment.