From 9ee690befa97c73163eb86d219b53d365238c9fb Mon Sep 17 00:00:00 2001 From: William Berglund Date: Sat, 24 Feb 2024 00:12:32 +0000 Subject: [PATCH] GenerationOptions 'stop' should be a string array, not string --- src/generation/options.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generation/options.rs b/src/generation/options.rs index 44dd423..c8c8c6c 100644 --- a/src/generation/options.rs +++ b/src/generation/options.rs @@ -14,7 +14,7 @@ pub struct GenerationOptions { pub(super) repeat_penalty: Option, pub(super) temperature: Option, pub(super) seed: Option, - pub(super) stop: Option, + pub(super) stop: Option>, pub(super) tfs_z: Option, pub(super) num_predict: Option, pub(super) top_k: Option, @@ -89,7 +89,7 @@ impl GenerationOptions { } /// Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Multiple stop patterns may be set by specifying multiple separate `stop` parameters in a modelfile. - pub fn stop(mut self, stop: String) -> Self { + pub fn stop(mut self, stop: Vec) -> Self { self.stop = Some(stop); self }