GPT-Brain/modules/INFO.py
sean1832 eb5361ff80 feat: directory filters to exclude files from unwanted directories.
A new feature that allows users to apply a filter to directories when selecting files, with the purpose of excluding specific directories and their contents from being displayed. The filter can help AI to focus on relevant files and avoid distractions or irrelevant information. This feature could be especially useful for users who work with large and complex vault.
2023-02-22 00:40:48 +11:00

36 lines
942 B
Python

import streamlit as st
import modules.utilities as util
st.set_page_config(
page_title='GPT Brain'
)
# path
USER_DIR = '.user'
LOG_PATH = '.user/log'
BRAIN_MEMO = '.user/brain-memo.json'
MANIFEST = '.core/manifest.json'
INIT_LANGUAGE = '.user/language.json'
# exclude directory
EXCLUDE_DIR_OFFICIAL = ['__pycache__',
'.git',
'.idea',
'.vscode',
'.obsidian',
'.trash',
'.git',
'.gitignore',
'.gitattributes']
# activate session
if 'SESSION_LANGUAGE' not in st.session_state:
st.session_state['SESSION_LANGUAGE'] = util.read_json_at(INIT_LANGUAGE, 'SESSION_LANGUAGE')
if 'FILTER_ROW_COUNT' not in st.session_state:
st.session_state['FILTER_ROW_COUNT'] = util.read_json_at(BRAIN_MEMO, 'filter_row_count')
# models
MODELS_OPTIONS = ['text-davinci-003', 'text-curie-001', 'text-babbage-001', 'text-ada-001']