summaryrefslogtreecommitdiffstats
path: root/src/config/role.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-10-28 21:39:17 +0800
committerGitHub <noreply@github.com>2023-10-28 21:39:17 +0800
commitbc44026ff8828f532e9eba138e2ba35f7c247271 (patch)
tree98c55ad31a543ff3cd56e297751d32ee9ca960a7 /src/config/role.rs
parent1575d441724a27854c8f9fe1510a47a3050ae28d (diff)
downloadaichat-bc44026ff8828f532e9eba138e2ba35f7c247271.tar.gz
feat: enhance session/conversation (#162)
* feat: enhance session/conversation * updates * updates * cut version v0.9.0-rc2 * add .session name completion
Diffstat (limited to 'src/config/role.rs')
-rw-r--r--src/config/role.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/role.rs b/src/config/role.rs
index 32ade08..23a69df 100644
--- a/src/config/role.rs
+++ b/src/config/role.rs
@@ -2,7 +2,7 @@ use super::message::{Message, MessageRole};
use serde::{Deserialize, Serialize};
-const TEMP_NAME: &str = "P";
+const TEMP_ROLE_NAME: &str = "temp";
const INPUT_PLACEHOLDER: &str = "__INPUT__";
#[derive(Debug, Clone, Deserialize, Serialize)]
@@ -18,14 +18,14 @@ pub struct Role {
impl Role {
pub fn new(prompt: &str, temperature: Option<f64>) -> Self {
Self {
- name: TEMP_NAME.into(),
+ name: TEMP_ROLE_NAME.into(),
prompt: prompt.into(),
temperature,
}
}
pub fn is_temp(&self) -> bool {
- self.name == TEMP_NAME
+ self.name == TEMP_ROLE_NAME
}
pub fn embeded(&self) -> bool {