diff options
| author | sigoden <sigoden@gmail.com> | 2025-02-10 14:57:08 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-10 14:57:08 +0800 |
| commit | 69974365ee786af5b643c335e2a12dd7817b84be (patch) | |
| tree | cdb43b4911907fc918b0719379ffdad4bb880f8d /src/client/model.rs | |
| parent | baf0c1ed07fc185fd237fbdf51aecaa8ed926ba6 (diff) | |
| download | aichat-69974365ee786af5b643c335e2a12dd7817b84be.tar.gz | |
feat: new model field `system_prompt_prefix` (#1163)
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 d80a1d4..8fcc6db 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -198,6 +198,10 @@ impl Model { self.data.no_system_message } + pub fn system_prompt_prefix(&self) -> Option<&str> { + self.data.system_prompt_prefix.as_deref() + } + pub fn max_tokens_per_chunk(&self) -> Option<usize> { self.data.max_tokens_per_chunk } @@ -321,6 +325,8 @@ pub struct ModelData { no_stream: bool, #[serde(default, skip_serializing_if = "std::ops::Not::not")] no_system_message: bool, + #[serde(skip_serializing_if = "Option::is_none")] + system_prompt_prefix: Option<String>, // embedding-only properties #[serde(skip_serializing_if = "Option::is_none")] |
