summaryrefslogtreecommitdiffstats
path: root/src/config/role.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-22 21:37:24 +0800
committerGitHub <noreply@github.com>2024-05-22 21:37:24 +0800
commit50b13d2de9c5573108f4b1c26306ad674ebb9f80 (patch)
tree2fff9f731f526da449dd50e99663308a71e34fed /src/config/role.rs
parentba3bcfd67c1d6fea5d3d3c5908c975682ee7909b (diff)
downloadaichat-50b13d2de9c5573108f4b1c26306ad674ebb9f80.tar.gz
refactor: rename `function_filter` to `function_matcher` (#535)
Diffstat (limited to 'src/config/role.rs')
-rw-r--r--src/config/role.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/role.rs b/src/config/role.rs
index c477ee4..515810c 100644
--- a/src/config/role.rs
+++ b/src/config/role.rs
@@ -29,7 +29,7 @@ pub struct Role {
#[serde(skip_serializing_if = "Option::is_none")]
pub top_p: Option<f64>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub function_filter: Option<String>,
+ pub function_matcher: Option<String>,
}
impl Role {
@@ -40,7 +40,7 @@ impl Role {
temperature: None,
model_id: None,
top_p: None,
- function_filter: None,
+ function_matcher: None,
}
}
@@ -74,13 +74,13 @@ async function timeout(ms) {
("%functions%", String::new(), Some(".*".into())),
]
.into_iter()
- .map(|(name, prompt, function_filter)| Self {
+ .map(|(name, prompt, function_matcher)| Self {
name: name.into(),
prompt,
model_id: None,
temperature: None,
top_p: None,
- function_filter,
+ function_matcher,
})
.collect()
}