Commit ·
6fab79c
1
Parent(s): 95b622c
Upload ChatIPC.cpp
Browse files- ChatIPC.cpp +9 -9
ChatIPC.cpp
CHANGED
|
@@ -1156,14 +1156,14 @@ static void load_kb_binary(KnowledgeBase &kb, const std::string &fname, int cli_
|
|
| 1156 |
}
|
| 1157 |
|
| 1158 |
static void print_usage(const char *p){
|
| 1159 |
-
std::cout << "Usage: " << p << " [--maxlen N] [--save FILE] [--load-kb FILE] [--
|
| 1160 |
-
std::cout << " --maxlen N
|
| 1161 |
-
std::cout << " --save FILE
|
| 1162 |
-
std::cout << " --load-kb FILE
|
| 1163 |
-
std::cout << " --
|
| 1164 |
-
std::cout << " --learn f1 f2 ...
|
| 1165 |
-
std::cout << " --repeat-penalty P
|
| 1166 |
-
std::cout << " --help
|
| 1167 |
}
|
| 1168 |
|
| 1169 |
int main(int argc, char **argv){
|
|
@@ -1181,7 +1181,7 @@ int main(int argc, char **argv){
|
|
| 1181 |
if (a=="--maxlen" && i+1<argc){ maxlen = std::stoul(argv[++i]); continue; }
|
| 1182 |
if (a=="--save" && i+1<argc){ savefile = argv[++i]; continue; }
|
| 1183 |
if (a=="--load-kb" && i+1<argc){ load_kb = argv[++i]; continue; }
|
| 1184 |
-
if (a=="--
|
| 1185 |
if (a=="--repeat-penalty" && i+1<argc){ repeat_penalty = std::stod(argv[++i]); continue; }
|
| 1186 |
if (a=="--learn"){
|
| 1187 |
++i;
|
|
|
|
| 1156 |
}
|
| 1157 |
|
| 1158 |
static void print_usage(const char *p){
|
| 1159 |
+
std::cout << "Usage: " << p << " [--maxlen N] [--save FILE] [--load-kb FILE] [--dictionary-depth D] [--learn f1 f2 ...] [--repeat-penalty P] [--help]\n";
|
| 1160 |
+
std::cout << " --maxlen N Maximum number of tokens constructed in a response.\n";
|
| 1161 |
+
std::cout << " --save FILE Save the knowledge-base and dictionary expansions to a binary file.\n";
|
| 1162 |
+
std::cout << " --load-kb FILE Load a previously saved knowledge-base (and dictionary expansions) from a binary file.\n";
|
| 1163 |
+
std::cout << " --dictionary-depth D Depth of dictionary-definition expansion used during learning.\n";
|
| 1164 |
+
std::cout << " --learn f1 f2 ... Learn from one or more text files to update the knowledge base.\n";
|
| 1165 |
+
std::cout << " --repeat-penalty P Penalize repeated tokens during response generation (higher values discourage repetition).\n";
|
| 1166 |
+
std::cout << " --help Show command-line interface options for ChatIPC usage.\n";
|
| 1167 |
}
|
| 1168 |
|
| 1169 |
int main(int argc, char **argv){
|
|
|
|
| 1181 |
if (a=="--maxlen" && i+1<argc){ maxlen = std::stoul(argv[++i]); continue; }
|
| 1182 |
if (a=="--save" && i+1<argc){ savefile = argv[++i]; continue; }
|
| 1183 |
if (a=="--load-kb" && i+1<argc){ load_kb = argv[++i]; continue; }
|
| 1184 |
+
if (a=="--dictionary-depth" && i+1<argc){ dict_depth = std::stoi(argv[++i]); continue; }
|
| 1185 |
if (a=="--repeat-penalty" && i+1<argc){ repeat_penalty = std::stod(argv[++i]); continue; }
|
| 1186 |
if (a=="--learn"){
|
| 1187 |
++i;
|