Alibrown commited on
Commit
d112861
·
verified ·
1 Parent(s): bca8e0e

Create modules/config_loader.py

Browse files
Files changed (1) hide show
  1. modules/config_loader.py +14 -0
modules/config_loader.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from pathlib import Path
3
+
4
+ def load_config():
5
+ config_path = Path(__file__).parent.parent / 'config.json'
6
+ try:
7
+ with open(config_path) as f:
8
+ return json.load(f)
9
+ except FileNotFoundError:
10
+ return {
11
+ "default_model": "gpt-3.5-turbo",
12
+ "max_file_size": 100000,
13
+ "enable_logging": True
14
+ }