-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.py
49 lines (47 loc) · 1.32 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
import sys
import tempfile
LOGGING_LEVEL = "DEBUG"
CONFIG = {
"app": {
"name": "orange-ai",
"icon": "assets/icon.png",
},
"variables": {
"import_bash_profile": False,
},
"ollama": {
"name": "ollama",
"url": "https://ollama.com",
"default_model": "llama3.1",
},
"openai": {"api_key": os.environ.get("OPENAPI_KEY"), "default_model": "gpt-3.5-turbo"},
"logging": {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"detailed": {"format": "%(asctime)s - %(levelname)s - %(name)s - %(message)s"},
},
"handlers": {
"stream": {
"level": LOGGING_LEVEL,
"class": "logging.StreamHandler",
"stream": sys.stdout,
"formatter": "detailed",
},
"file": {
"level": LOGGING_LEVEL,
"class": "logging.FileHandler",
"filename": tempfile.NamedTemporaryFile(delete=False).name,
"formatter": "detailed",
},
},
"loggers": {
"": { # Root logger configuration
"handlers": ["stream", "file"],
"level": LOGGING_LEVEL,
"propagate": True,
},
},
},
}