diff options
| author | sigoden <sigoden@gmail.com> | 2025-02-10 16:19:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-10 16:19:18 +0800 |
| commit | 4fab4c54b2916931bf5705b5aa5e560e57f7f289 (patch) | |
| tree | 1b35844aebc157bfcefad7f61e41c873a98fecdc /src/client/model.rs | |
| parent | 69974365ee786af5b643c335e2a12dd7817b84be (diff) | |
| download | aichat-4fab4c54b2916931bf5705b5aa5e560e57f7f289.tar.gz | |
feat: add model field `no_temperature` (#1164)
Diffstat (limited to 'src/client/model.rs')
| -rw-r--r-- | src/client/model.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/model.rs b/src/client/model.rs index 8fcc6db..6681856 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -198,6 +198,10 @@ impl Model { self.data.no_system_message } + pub fn no_temperature(&self) -> bool { + self.data.no_temperature + } + pub fn system_prompt_prefix(&self) -> Option<&str> { self.data.system_prompt_prefix.as_deref() } @@ -325,6 +329,8 @@ pub struct ModelData { no_stream: bool, #[serde(default, skip_serializing_if = "std::ops::Not::not")] no_system_message: bool, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + no_temperature: bool, #[serde(skip_serializing_if = "Option::is_none")] system_prompt_prefix: Option<String>, |
