Skip to content

Commit

Permalink
add LOAD_DEFAULT_DATASET and DEFAULT_DATASET_NAME to .env.production …
Browse files Browse the repository at this point in the history
…on setup

Signed-off-by: cbh778899 <[email protected]>
  • Loading branch information
cbh778899 committed Aug 25, 2024
1 parent cc23f17 commit 2065d07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ALLOW_ORIGIN="*"
STATIC_API_KEY_ENABLED=0
ENABLE_HTTPS=0
ENABLE_PLUGIN=0
ENABLE_HTTPS=0
HTTPS_KEY_PATH="*/privkey.pem"
HTTPS_CERT_PATH="*/cert.pem"
HTTPS_CA_PATH="*/chain.pem"
SYSTEM_INSTRUCTION="*"
LOAD_DEFAULT_DATASET=0
DEFAULT_DATASET_NAME="production_dataset"
AVAILABLE_APIS="ALL"
4 changes: 3 additions & 1 deletion setup/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,14 @@ void saveSettings(int show_message) {
fprintf(f, ENV_PRODUCTION_FILE,
allow_origin_name,
static_api_key_enabled,
https_enabled,
plugin_enabled,
https_enabled,
https_cert_path_container, https_privkey_name,
https_cert_path_container, https_cert_name,
https_cert_path_container, https_ca_name,
system_instruction,
default_dataset_enabled,
default_dataset_name,
api_enabled_str
);
fclose(f);
Expand Down
4 changes: 3 additions & 1 deletion setup/setup_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,14 @@
#define ENV_PRODUCTION_FILE \
"ALLOW_ORIGIN=\"%s\"\n"\
"STATIC_API_KEY_ENABLED=%d\n"\
"ENABLE_HTTPS=%d\n"\
"ENABLE_PLUGIN=%d\n"\
"ENABLE_HTTPS=%d\n"\
"HTTPS_KEY_PATH=\"%s/%s\"\n"\
"HTTPS_CERT_PATH=\"%s/%s\"\n"\
"HTTPS_CA_PATH=\"%s/%s\"\n"\
"SYSTEM_INSTRUCTION=\"%s\"\n"\
"LOAD_DEFAULT_DATASET=%d\n"\
"DEFAULT_DATASET_NAME=\"%s\"\n"\
"AVAILABLE_APIS=\"%s\""

#define AVAILABLE_APIS_FORMAT "%d%d%d%d.%d%d.%d.%d%d.%d"
Expand Down

0 comments on commit 2065d07

Please sign in to comment.