Skip to content

Commit

Permalink
Merge pull request #26 from functorism/master
Browse files Browse the repository at this point in the history
GenerationOptions 'stop' should be a string array, not string
  • Loading branch information
pepperoni21 authored Feb 24, 2024
2 parents 71b00aa + 9ee690b commit 667f533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generation/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct GenerationOptions {
pub(super) repeat_penalty: Option<f32>,
pub(super) temperature: Option<f32>,
pub(super) seed: Option<i32>,
pub(super) stop: Option<String>,
pub(super) stop: Option<Vec<String>>,
pub(super) tfs_z: Option<f32>,
pub(super) num_predict: Option<i32>,
pub(super) top_k: Option<u32>,
Expand Down Expand Up @@ -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<String>) -> Self {
self.stop = Some(stop);
self
}
Expand Down

0 comments on commit 667f533

Please sign in to comment.