summaryrefslogtreecommitdiff
path: root/common/common.h
diff options
context:
space:
mode:
authorAlexey Parfenov <zxed@alkatrazstudio.net>2024-02-11 13:43:31 +0000
committerGitHub <noreply@github.com>2024-02-11 15:43:31 +0200
commita803333a4e6fc534c93afe90d741bc2388bdec87 (patch)
tree0f4781f58f4391691823cdabaaf604afae333155 /common/common.h
parent684780141a08200ec98eba3e982dbafd1d0b5000 (diff)
common : use enums for sampler types (#5418)
* common: use enums for sampler types * Apply suggestions from code review Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * minor : spaces --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/common.h b/common/common.h
index 62de25d6..9bdd45cf 100644
--- a/common/common.h
+++ b/common/common.h
@@ -162,10 +162,13 @@ std::string gpt_random_prompt(std::mt19937 & rng);
void process_escapes(std::string& input);
//
-// String parsing
+// String utils
//
-std::string parse_samplers_input(std::string input);
+std::vector<llama_sampler_type> sampler_types_from_names(const std::vector<std::string> & names);
+std::vector<llama_sampler_type> sampler_types_from_chars(const std::string & names_string);
+std::vector<std::string> string_split(std::string input, char separator);
+std::string sampler_type_to_name_string(llama_sampler_type sampler_type);
//
// Model utils