diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-08 13:46:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-08 13:46:26 +0800 |
| commit | 7762cd6bed7f95fa855144e01aa94e932869fe12 (patch) | |
| tree | 66e3d9371f4db081a2ce87e763c5c717c355adfc /src/config/mod.rs | |
| parent | 1c6c740381d0da4bcb70c6531bf93b406b94d9a6 (diff) | |
| download | aichat-7762cd6bed7f95fa855144e01aa94e932869fe12.tar.gz | |
refactor: model pass_max_tokens (#493)
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index f33ee73..5ac44a8 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -422,7 +422,7 @@ impl Config { ( "max_output_tokens", self.model - .max_output_tokens + .max_tokens_param() .map(|v| format!("{v} (current model)")) .unwrap_or_else(|| "-".into()), ), @@ -523,7 +523,7 @@ impl Config { (values, args[0]) } else if args.len() == 2 { let values = match args[0] { - "max_output_tokens" => match self.model.show_max_output_tokens() { + "max_output_tokens" => match self.model.max_output_tokens { Some(v) => vec![v.to_string()], None => vec![], }, @@ -564,7 +564,7 @@ impl Config { match key { "max_output_tokens" => { let value = parse_value(value)?; - self.model.set_max_output_tokens(value); + self.model.set_max_tokens(value, true); } "temperature" => { let value = parse_value(value)?; |
