diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-06 08:35:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 08:35:40 +0800 |
| commit | 8e5d4e55b1a5158a1f35adaf044dec545159f426 (patch) | |
| tree | b360cc4e9ad8acccea3c68b37057798cd1d657c0 /src/config/mod.rs | |
| parent | be4e5e569a61c54d8ac8fb77144e9b1d01e3b81f (diff) | |
| download | aichat-8e5d4e55b1a5158a1f35adaf044dec545159f426.tar.gz | |
refactor: rename model's `max_tokens` to `max_input_tokens` (#339)
BREAKING CHANGE: rename model's `max_tokens` to `max_input_tokens`
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 4a37378..909e751 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -750,7 +750,7 @@ impl Config { pub fn prepare_send_data(&self, input: &Input, stream: bool) -> Result<SendData> { let messages = self.build_messages(input)?; - self.model.max_tokens_limit(&messages)?; + self.model.max_input_tokens_limit(&messages)?; Ok(SendData { messages, temperature: self.get_temperature(), @@ -773,8 +773,8 @@ impl Config { output.insert("client_name", self.model.client_name.clone()); output.insert("model_name", self.model.name.clone()); output.insert( - "max_tokens", - self.model.max_tokens.unwrap_or_default().to_string(), + "max_input_tokens", + self.model.max_input_tokens.unwrap_or_default().to_string(), ); if let Some(temperature) = self.temperature { if temperature != 0.0 { |
