Skip to content

Commit

Permalink
fix: config export can find LEGACY value
Browse files Browse the repository at this point in the history
  • Loading branch information
sean1832 committed Mar 26, 2023
1 parent 8e5a46f commit 32a78ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/Components/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def sidebar():
"3. πŸƒ Run\n"
"---")

with st.expander('βš™οΈ Configs Import'):
config_file = st.file_uploader("πŸ“ Import Configs", type=['json'])
config_file = st.file_uploader("πŸ“ Import Configs", type=['json'])

api_input = st.text_input(label="πŸ”‘ OpenAI API Key",
placeholder="Enter your OpenAI API key (sk-...)",
Expand All @@ -75,7 +74,9 @@ def sidebar():
set_final_summary_mode(enable_final_summary)

with st.expander('πŸ€– Bot Persona'):
language = st.selectbox('Language', ['English', 'Chinese', 'Japanese', 'Korean', 'Spanish', 'French', 'German'])
language_options = ['English', 'Chinese', 'Japanese', 'Korean', 'Spanish', 'French', 'German']
language_index = language_options.index(_set_config(config_file, "LANGUAGE", 'English'))
language = st.selectbox('Language', options=language_options, index=language_index)
default_persona_rec_legacy = 'Provide a detailed and comprehensive summary of the following content in flawless ' \
f'{language}, ensuring all key points are covered. Create a markdown heading (###) that ' \
f'encapsulates the core information of the content. Make sure it is answered in {language}.'
Expand Down Expand Up @@ -172,7 +173,9 @@ def sidebar():
"PRESENCE_PENALTY": presence_penalty,
"MODEL": model,
"ENABLE_DELAY": delay > 0,
"DELAY_TIME": delay
"DELAY_TIME": delay,
"LANGUAGE": language,
"LEGACY": enable_legacy
}, indent=4),
file_name="configs.json")
Components.Info.info()
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SumGPT",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"author": "Zeke Zhang",
"homepage": "https://github.com/sean1832/SumGPT",
Expand Down

0 comments on commit 32a78ce

Please sign in to comment.