feat: add auto save operation when send

pull/1/head
sean1832 1 year ago
parent 71ef16ac77
commit 083ea51128

@ -90,7 +90,9 @@ with st.sidebar:
# remove 'my-info' from prompt dictionary
prompt_dictionary.pop('my-info')
operations = st.multiselect('Operations', list(prompt_dictionary.keys()), default=list(prompt_dictionary.keys())[0])
operation_options = list(prompt_dictionary.keys())
operations = st.multiselect('Operations', operation_options, default=util.read_json_at(BRAIN_MEMO, 'operations', operation_options[0]))
question_model = st.selectbox('Question Model', model_options)
operations_no_question = [op for op in operations if op != 'question']
@ -162,6 +164,9 @@ def execute_brain(q):
value = param_dict[key]
util.update_json(BRAIN_MEMO, key, value)
# write operation to json
util.update_json(BRAIN_MEMO, 'operations', operations)
# main

Loading…
Cancel
Save