-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.py
More file actions
19 lines (16 loc) · 733 Bytes
/
config.py
File metadata and controls
19 lines (16 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from configparser import ConfigParser
def read_openai_config():
config = ConfigParser()
config.read('config.dev.cfg')
return config['openai']
def read_google_gemini_config():
config = ConfigParser()
config.read('config.dev.cfg')
return config['google']
# def upload_file_to_firebase(file_name, ext) -> str: # File needs to be in same directory as this config file
# cred = credentials.Certificate("YOUR DOWNLOADED CREDENTIALS FILE (JSON)")
# initialize_app(cred, {'storageBucket': 'YOUR FIREBASE STORAGE PATH (without gs://)'})
# bucket = storage.bucket()
# blob = bucket.blob(f"{file_name}.{ext}")
# blob.upload_from_filename(f"{file_name}.{ext}")
# return blob._get_download_url