summaryrefslogtreecommitdiff
path: root/common/common.h
diff options
context:
space:
mode:
authorbandoti <141645996+bandoti@users.noreply.github.com>2023-11-01 14:42:01 -0300
committerGitHub <noreply@github.com>2023-11-01 19:42:01 +0200
commit0e40806c1cb3bdf9955ed807ffbe212be85b4c67 (patch)
treed7b729e9ff3c29f7c7f4d9cdad186a9698c72ae7 /common/common.h
parenta2758d08e44ce3624d233af4d23c6843e2e735b5 (diff)
common : allow caller to handle help/argument exceptions (#3715)
* Allow caller to handle help/argument exceptions * Prepend newline to usage output * Add new gpt_params_parse_ex function to hide arg-parse impl * Fix issue blocking success case * exit instead of returning false * Update common/common.h Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * Update common/common.cpp Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h
index 84523a4f..343b2721 100644
--- a/common/common.h
+++ b/common/common.h
@@ -110,6 +110,8 @@ struct gpt_params {
std::string image = ""; // path to an image file
};
+bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params);
+
bool gpt_params_parse(int argc, char ** argv, gpt_params & params);
void gpt_print_usage(int argc, char ** argv, const gpt_params & params);