-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
50 lines (33 loc) · 1014 Bytes
/
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
50
#
# Copyright (c) 2024, 2025 MongoDB Inc.
# Author: Benjamin Lorenz <benjamin.lorenz@mongodb.com>
#
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
# MongoDB Atlas
MONGO_URI = os.environ['MONGODB_IST_MEDIA']
# currently supported LLMs
AVAILABLE_LLMS = { 'OpenAI GPT-3.5' : 'gpt-3.5-turbo',
'OpenAI GPT-4' : 'gpt-4-turbo',
'OpenAI GPT-4o' : 'gpt-4o' }
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
API_BASE_URL = 'http://localhost:9090/api'
# turn Flask into debug mode
DEBUG = True
class ProductionConfig(Config):
API_BASE_URL = 'https://ist.media/api'
# cookie security
SESSION_COOKIE_SECURE = True
REMEMBER_COOKIE_SECURE = True
REMEMBER_COOKIE_HTTPONLY = True
@classmethod
def init_app(cls, app):
Config.init_app(app)
config = {
'development' : DevelopmentConfig,
'production' : ProductionConfig
}